Change fields and views

This commit is contained in:
nasia 2017-08-28 15:24:51 +03:00
parent 30e70cc5d6
commit 819d55366c
11 changed files with 73 additions and 65 deletions

View file

@ -4,11 +4,11 @@ class Sponsor < ActiveRecord::Base
belongs_to :sponsorship_level
belongs_to :conference
serialize :swags, Hash
serialize :courier_info, Hash
serialize :swag, Hash
serialize :swag_transportation, Hash
attr_accessor :type, :quantity, :swag_index, :courier_index,
:courier_name, :tracking_number, :boxes
attr_accessor :type, :quantity, :swag_index, :carrier_index,
:carrier_name, :tracking_number, :boxes
has_paper_trail ignore: [:updated_at], meta: { conference_id: :conference_id }
@ -23,7 +23,6 @@ class Sponsor < ActiveRecord::Base
state :unconfirmed
state :confirmed
event :confirm do
transitions to: :confirmed, from: [:unconfirmed]
end