mirror of
https://github.com/internetee/registry.git
synced 2025-08-04 17:01:44 +02:00
Update money-rails
gem
This commit is contained in:
parent
98a95ec592
commit
3633d44822
3 changed files with 21 additions and 78 deletions
|
@ -1,69 +1,4 @@
|
|||
# encoding : utf-8
|
||||
|
||||
MoneyRails.configure do |config|
|
||||
# To set the default currency
|
||||
#
|
||||
# Wrapper for Money#default_currency with additional functionality
|
||||
config.default_currency = :eur
|
||||
|
||||
# Set default bank object
|
||||
#
|
||||
# Example:
|
||||
# config.default_bank = EuCentralBank.new
|
||||
|
||||
# Add exchange rates to current money bank object.
|
||||
# (The conversion rate refers to one direction only)
|
||||
#
|
||||
# Example:
|
||||
# config.add_rate "USD", "CAD", 1.24515
|
||||
# config.add_rate "CAD", "USD", 0.803115
|
||||
|
||||
# To handle the inclusion of validations for monetized fields
|
||||
# The default value is true
|
||||
#
|
||||
# config.include_validations = true
|
||||
|
||||
# Default ActiveRecord migration configuration values for columns:
|
||||
#
|
||||
# config.amount_column = { prefix: '', # column name prefix
|
||||
# postfix: '_cents', # column name postfix
|
||||
# column_name: nil, # full column name (overrides prefix, postfix and accessor name)
|
||||
# type: :integer, # column type
|
||||
# present: true, # column will be created
|
||||
# null: false, # other options will be treated as column options
|
||||
# default: 0
|
||||
# }
|
||||
#
|
||||
# config.currency_column = { prefix: '',
|
||||
# postfix: '_currency',
|
||||
# column_name: nil,
|
||||
# type: :string,
|
||||
# present: true,
|
||||
# null: false,
|
||||
# default: 'USD'
|
||||
# }
|
||||
|
||||
# Register a custom currency
|
||||
#
|
||||
# Example:
|
||||
# config.register_currency = {
|
||||
# :priority => 1,
|
||||
# :iso_code => "EU4",
|
||||
# :name => "Euro with subunit of 4 digits",
|
||||
# :symbol => "€",
|
||||
# :symbol_first => true,
|
||||
# :subunit => "Subcent",
|
||||
# :subunit_to_unit => 10000,
|
||||
# :thousands_separator => ".",
|
||||
# :decimal_mark => ","
|
||||
# }
|
||||
|
||||
# Set default money format globally.
|
||||
# Default value is nil meaning "ignore this option".
|
||||
# Example:
|
||||
#
|
||||
# config.default_format = {
|
||||
# :no_cents_if_whole => nil,
|
||||
# :symbol => nil,
|
||||
# :sign_before_symbol => nil
|
||||
# }
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue