Skip to content

Commit a07a178

Browse files
authored
Merge branch 'main' into main
2 parents 18e515a + fa31f3b commit a07a178

File tree

4 files changed

+9
-8
lines changed

4 files changed

+9
-8
lines changed

CHANGELOG.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646

4747
- Bump money version to ~> 6.12.0
4848
- Bump monetize version to ~> 1.9.0
49-
- BREAKING CHANGE: Fix to rounding logic in this version from 1.11.0 can cause breaking changes for those relying on the incorrect behavior. Eee [the issue](https://github.com/RubyMoney/money-rails/issues/608) for details.
49+
- BREAKING CHANGE: Fix to rounding logic in this version from 1.11.0 can cause breaking changes for those relying on the incorrect behavior. See [the issue](https://github.com/RubyMoney/money-rails/issues/608) for details.
5050

5151
## 1.11.0
5252

@@ -84,7 +84,7 @@
8484
- Fix attribute order possibly affecting the value of monetized attribute
8585
- Add support for RailsAdmin (use :money type)
8686
- Raise error when gem was unable to infer monetized attribute name
87-
- Revert decimal mark and thousands separator addtion, since formatting should depend on country and locale, instead of currency
87+
- Revert decimal mark and thousands separator addition, since formatting should depend on country and locale, instead of currency
8888

8989
## 1.6.1
9090

@@ -148,8 +148,8 @@
148148
## 1.1.0
149149

150150
- Update dependencies to money 6.4.x and monetize 1.0.x.
151-
- Make subunit setter (e.g. `#price_cents=`) set the `before_type_cast...` va
152-
riable. (Fixes validation errors.)
151+
- Make subunit setter (e.g. `#price_cents=`) set the `before_type_cast...`
152+
variable. (Fixes validation errors.)
153153
- use HashWithIndifferentAccess instead of Hash for
154154
ActiveRecord::Base::monetized_attributes
155155
- Let the 'monetize' test helper work when testing against the model's class,
@@ -159,7 +159,7 @@
159159
- Upgrade specs to RSpec 3
160160
- Use #respond_to? instead of #try? when monetizing an aliased attribute.
161161
- Allow aliased attributes to be monetized
162-
- Fix compatability issue with Rails 4.2
162+
- Fix compatibility issue with Rails 4.2
163163
- Allow empty string as thousands separator.
164164
- Allow using a lambda to set default_currency
165165

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,8 @@ monetize :optional_price_cents, allow_nil: true
138138

139139
# in Migration
140140
def change
141-
add_money :products, :optional_price, amount: { null: true, default: nil }
141+
add_money :products, :optional_price, amount: { null: true, default: nil }, currency: { null: true, default: nil } # Rails 3
142+
add_monetize :products, :optional_price, amount: { null: true, default: nil }, currency: { null: true, default: nil } # Rails 4x and above
142143
end
143144

144145
# now blank assignments are permitted

lib/money-rails/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module MoneyRails
2-
VERSION = '1.14.0'
2+
VERSION = '1.15.0'
33
end

money-rails.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Gem::Specification.new do |s|
3232
s.add_dependency "railties", ">= 3.0"
3333
s.add_dependency "mime-types", "< 3" if RUBY_VERSION < '2.0' # mime-types > 3 depends on mime-types-data, which doesn't support ruby 1.9
3434

35-
s.add_development_dependency "rails", ">= 3.0"
35+
s.add_development_dependency "rails", ">= 3.0", "< 7.0"
3636
s.add_development_dependency "rspec-rails", "~> 3.0"
3737
s.add_development_dependency 'database_cleaner', '~> 1.6.1'
3838
s.add_development_dependency 'test-unit', '~> 3.0' if RUBY_VERSION >= '2.2'

0 commit comments

Comments
 (0)