Skip to content

Commit a90081a

Browse files
authored
Merge branch 'main' into version
2 parents e27b6ad + 9787c4f commit a90081a

File tree

4 files changed

+12
-9
lines changed

4 files changed

+12
-9
lines changed

CHANGELOG.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
- Fix invalid_currency error definition
66
- Add Russian translation for errors
7+
- Loosen money version to ~> 6.13
8+
- Loosen monetize version to ~> 1.9
79

810
## 1.14.0
911

@@ -44,7 +46,7 @@
4446

4547
- Bump money version to ~> 6.12.0
4648
- Bump monetize version to ~> 1.9.0
47-
- 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.
4850

4951
## 1.11.0
5052

@@ -82,7 +84,7 @@
8284
- Fix attribute order possibly affecting the value of monetized attribute
8385
- Add support for RailsAdmin (use :money type)
8486
- Raise error when gem was unable to infer monetized attribute name
85-
- 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
8688

8789
## 1.6.1
8890

@@ -146,8 +148,8 @@
146148
## 1.1.0
147149

148150
- Update dependencies to money 6.4.x and monetize 1.0.x.
149-
- Make subunit setter (e.g. `#price_cents=`) set the `before_type_cast...` va
150-
riable. (Fixes validation errors.)
151+
- Make subunit setter (e.g. `#price_cents=`) set the `before_type_cast...`
152+
variable. (Fixes validation errors.)
151153
- use HashWithIndifferentAccess instead of Hash for
152154
ActiveRecord::Base::monetized_attributes
153155
- Let the 'monetize' test helper work when testing against the model's class,
@@ -157,7 +159,7 @@
157159
- Upgrade specs to RSpec 3
158160
- Use #respond_to? instead of #try? when monetizing an aliased attribute.
159161
- Allow aliased attributes to be monetized
160-
- Fix compatability issue with Rails 4.2
162+
- Fix compatibility issue with Rails 4.2
161163
- Allow empty string as thousands separator.
162164
- Allow using a lambda to set default_currency
163165

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: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ Gem::Specification.new do |s|
2727
s.require_path = "lib"
2828

2929
s.add_dependency "money", "~> 6.13"
30-
s.add_dependency "monetize", "~> 1.9.0"
30+
s.add_dependency "monetize", "~> 1.9"
3131
s.add_dependency "activesupport", ">= 3.0"
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)