nofxx-money 2.2.1 → 2.2.2

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -90,7 +90,7 @@ app/models/product.rb
90
90
  validate :cents_not_zero
91
91
 
92
92
  def cents_not_zero
93
- errors.add("price_in_cents", "cannot be zero or less") unless cents > 0
93
+ errors.add("price_cents", "cannot be zero or less") unless cents > 0
94
94
  end
95
95
 
96
96
  validates_presence_of :sku, :currency
@@ -100,7 +100,7 @@ app/models/product.rb
100
100
  migration:
101
101
 
102
102
  create_table :products do |t|
103
- t.integer :price_in_cents
103
+ t.integer :price_cents
104
104
  t.string :price_currency
105
105
  end
106
106
 
@@ -26,7 +26,7 @@ module ActsAsMoney #:nodoc:
26
26
  :allow_nil => false }.update(attributes.extract_options!)
27
27
 
28
28
  attributes.each do |attr|
29
- mapping = [[config[:cents] || "#{attr}_in_cents", 'cents']]
29
+ mapping = [[config[:cents] || "#{attr}_cents", 'cents']]
30
30
  mapping << [config[:currency] || "#{attr}_currency", 'currency'] if config[:with_currency]
31
31
 
32
32
  composed_of attr, :class_name => 'Money',:allow_nil => config[:allow_nil],
data/lib/money.rb CHANGED
@@ -25,5 +25,5 @@ require 'money/money'
25
25
  require 'money/core_extensions'
26
26
 
27
27
  class Money
28
- VERSION = "2.2.1"
28
+ VERSION = "2.2.2"
29
29
  end
data/money.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{money}
5
- s.version = "2.2.1"
5
+ s.version = "2.2.2"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["FIXME full name"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nofxx-money
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.1
4
+ version: 2.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - FIXME full name