Sha256: 7407f4d6be609ef252058812f3e92ed449a2de4adcc48b76e66fdc4345035368
Contents?: true
Size: 1.05 KB
Versions: 1
Compression:
Stored size: 1.05 KB
Contents
# Administrate::Field::Money [](https://codeclimate.com/github/z-productions/administrate-field-money) A plugin to deal with money in [Administrate], with the help of [Money] gem. **Attribute must be in cents**.  ## Usage Add it to your `Gemfile`: ```ruby gem 'administrate-field-money', '~> 0.0.1' ``` Run: ```bash $ bundle install ``` Add to your `FooDashboard`: ```ruby ATTRIBUTE_TYPES = { bar: Field::Money.with_options( unit: 'USD', # EUR, CAD, GBP, AUD, JPY, ... symbol: '$', delimiter: ',', separator: '.' ), }.freeze ``` The field will figure out the appropriate thousand separator and decimal delimiter for the unit. ## About Administrate::Field::Money is maintained by [z.productions]. [Administrate]: https://github.com/thoughtbot/administrate [Money]: https://github.com/RubyMoney/money [z.productions]: https://www.z.productions/
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
administrate-field-money-0.0.2 | README.md |