Skip to content

Commit

Permalink
Merge pull request #213 from avo-hq/update-money-field
Browse files Browse the repository at this point in the history
Add Example of Money Field
  • Loading branch information
gabrielgiroe1 authored May 28, 2024
2 parents b0e61ff + 14c6586 commit 61b3314
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions docs/3.0/fields/money.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,27 @@ The `Money` field is used to display a monetary value.
```ruby
field :price, as: :money, currencies: %w[EUR USD RON PEN]
```
## Money Field Example

You can explore the implementation of the money field in [avodemo](https://main.avodemo.com/avo/resources/products/new) and it's corresponding code on GitHub [here](https://github.com/avo-hq/main.avodemo.com/blob/main/app/avo/resources/product.rb)

### Example on new

<img :src="('/assets/img/money-field.png')" class="border mb-4" />

<img :src="('/assets/img/money-field2.png')" class="border mb-4" />

### Example on show with currencies USD

<img :src="('/assets/img/money-field-show.png')" class="border mb-4" />

### Example on show with currencies RON

<img :src="('/assets/img/money-field-show-lei.png')" class="border mb-4" />

### Example on index

<img :src="('/assets/img/money-field-index.png')" class="border mb-4" />

## Installation

Expand Down
Binary file added docs/public/assets/img/money-field-index.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/public/assets/img/money-field-show-lei.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/public/assets/img/money-field-show.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/public/assets/img/money-field.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/public/assets/img/money-field2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 61b3314

Please sign in to comment.