houndci fixes
This commit is contained in:
parent
6b075370b5
commit
98030936fa
1 changed files with 0 additions and 2 deletions
|
|
@ -4,9 +4,7 @@ class SupporterLevel < ActiveRecord::Base
|
||||||
monetize :price_cents, with_model_currency: :price_currency
|
monetize :price_cents, with_model_currency: :price_currency
|
||||||
attr_accessible :conference, :title, :url, :description, :price_currency, :amount, :price_cents
|
attr_accessible :conference, :title, :url, :description, :price_currency, :amount, :price_cents
|
||||||
validate :convert_money_to_cents
|
validate :convert_money_to_cents
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
def convert_money_to_cents
|
def convert_money_to_cents
|
||||||
self.price_cents = (self.amount.to_d * 100).to_i
|
self.price_cents = (self.amount.to_d * 100).to_i
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue