Registration Component

This commit is contained in:
Gopesh Tulsyan 2014-05-23 21:21:11 +05:30
parent 643b8b173a
commit 5c9e0a279e
19 changed files with 172 additions and 36 deletions

View file

@ -9,7 +9,7 @@ class Conference < ActiveRecord::Base
:questions_attributes, :question_ids, :answers_attributes, :answer_ids,
:difficulty_levels_attributes, :use_difficulty_levels,
:use_vpositions, :use_vdays, :vdays_attributes, :vpositions_attributes, :use_volunteers,
:media_id, :media_type
:media_id, :media_type, :registration_description, :ticket_description
has_paper_trail

View file

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