Class: StatementsController
- Inherits:
-
ArtfullyOseController
- Object
- ActionController::Base
- ArtfullyOseController
- StatementsController
- Defined in:
- app/controllers/statements_controller.rb
Instance Method Summary collapse
Instance Method Details
#index ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 15 |
# File 'app/controllers/statements_controller.rb', line 3 def index :view, Statement if params[:event_id].present? @event = Event.find(params[:event_id]) :view, @event @shows = @event.shows @statement = nil render :show and return else @events = current_organization.events @events.each {|event| :view, event} end end |
#show ⇒ Object
17 18 19 20 21 22 23 |
# File 'app/controllers/statements_controller.rb', line 17 def show @show = ::Show.includes(:event => :venue, :items => [:order, :discount, :product => :ticket_type, :pass => :pass_type]).find(params[:id]) :view, @show @event = @show.event @shows = @event.shows.includes(:event => :venue) @statement = Statement.for_show(@show, @show.imported?) end |