diff options
author | Rafael França <rafaelmfranca@gmail.com> | 2016-03-05 22:06:23 -0300 |
---|---|---|
committer | Rafael França <rafaelmfranca@gmail.com> | 2016-03-05 22:06:23 -0300 |
commit | a06fb60d1537e51022a22b35a389bab1beb76ea8 (patch) | |
tree | 5cdaca3153892402023e76165fe3ddc965e4a213 | |
parent | 403c57aec052d60431dbae57eedae471d548dd01 (diff) | |
parent | 55a205c552a4815c692355ca6bcf087524ebae92 (diff) | |
download | rails-a06fb60d1537e51022a22b35a389bab1beb76ea8.tar.gz rails-a06fb60d1537e51022a22b35a389bab1beb76ea8.tar.bz2 rails-a06fb60d1537e51022a22b35a389bab1beb76ea8.zip |
Merge pull request #24080 from y-yagi/make_attributes_api_example_to_work
make attributes API example to work [ci skip]
-rw-r--r-- | activerecord/lib/active_record/attributes.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/attributes.rb b/activerecord/lib/active_record/attributes.rb index 50a74ab18a..e0ceafc617 100644 --- a/activerecord/lib/active_record/attributes.rb +++ b/activerecord/lib/active_record/attributes.rb @@ -154,7 +154,7 @@ module ActiveRecord # end # # class MoneyType < Type::Value - # def initialize(currency_converter) + # def initialize(currency_converter:) # @currency_converter = currency_converter # end # @@ -171,7 +171,7 @@ module ActiveRecord # # class Product < ActiveRecord::Base # currency_converter = ConversionRatesFromTheInternet.new - # attribute :price_in_bitcoins, :money, currency_converter + # attribute :price_in_bitcoins, :money, currency_converter: currency_converter # end # # Product.where(price_in_bitcoins: Money.new(5, "USD")) |