houndci fixes

This commit is contained in:
Gopesh Tulsyan 2014-05-23 21:38:40 +05:30
parent 5c9e0a279e
commit 3e349911c3
2 changed files with 7 additions and 5 deletions

View file

@ -2,10 +2,12 @@ class SupporterLevel < ActiveRecord::Base
belongs_to :conference
has_many :supporter_registrations
monetize :price_cents, with_model_currency: :price_currency
attr_accessible :conference, :title, :url, :description, :price_currency, :amount
attr_accessible :conference, :title, :url, :description, :price_currency, :amount, :price_cents
validate :convert_money_to_cents
private
def convert_money_to_cents
self.price_cents = (self.amount.to_d * 100).to_i
end
def convert_money_to_cents
self.price_cents = (self.amount.to_d * 100).to_i
end
end

View file

@ -1,5 +1,5 @@
class AddRegistrationDescriptionToConference < ActiveRecord::Migration
def change
add_column :conferences, :registration_description, :text
add_column :conferences, :registration_description, :text
end
end