Module: Ticket::SaleTransitions

Extended by:
ActiveSupport::Concern
Included in:
Ticket
Defined in:
app/models/ticket/sale_transitions.rb

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary collapse

Instance Method Details

#put_on_saleObject



12
13
14
15
16
17
18
# File 'app/models/ticket/sale_transitions.rb', line 12

def put_on_sale
  begin
    on_sale!
  rescue Transitions::InvalidTransition
    return false
  end
end

#take_off_saleObject



4
5
6
7
8
9
10
# File 'app/models/ticket/sale_transitions.rb', line 4

def take_off_sale
  begin
    off_sale!
  rescue Transitions::InvalidTransition
    return false
  end
end