app/models/chart.rb in artfully_ose-1.2.0 vs app/models/chart.rb in artfully_ose-1.3.0.pre1
- old
+ new
@@ -1,10 +1,10 @@
class Chart < ActiveRecord::Base
include Ticket::Foundry
foundry :using => :sections, :with => lambda { { :venue => event.venue.name } }
attr_accessor :skip_create_first_section
- attr_accessible :name, :is_template, :event_id, :organization_id, :old_mongo_id, :sections_attributes, :ticket_types_attributes, :organization, :event, :skip_create_first_section
+ attr_accessible :name, :is_template, :event_id, :organization_id, :sections_attributes, :ticket_types_attributes, :organization, :event, :skip_create_first_section
belongs_to :event
belongs_to :organization
has_one :show
has_many :sections, :order => 'name DESC'
@@ -66,11 +66,11 @@
#
# params_hash is the params[:chart] with :section_attributes as a key.
# This is how they're submitted from the ticket types form
#
def update_attributes_from_params(params_hash = {})
- update_attributes(params_hash)
upgrade_event
+ update_attributes(params_hash)
end
#If this is a free event, and they've specified prices on this chart, then upgrade to a paid event
def upgrade_event
if !event.nil? && event.free? && has_paid_sections?