Class: VenuesController

Inherits:
ArtfullyOseController show all
Defined in:
app/controllers/venues_controller.rb

Instance Method Summary collapse

Instance Method Details

#editObject



2
3
4
5
6
# File 'app/controllers/venues_controller.rb', line 2

def edit
  @event = Event.find(params[:event_id])
  authorize! :edit, @event
  @venue = @event.venue
end

#updateObject



8
9
10
11
12
13
14
15
16
17
18
# File 'app/controllers/venues_controller.rb', line 8

def update
  @event = Event.find(params[:event_id])
  authorize! :edit, @event
  @venue = @event.venue
  @venue.update_attributes(params[:venue])
  if params[:commit].try(:downcase) =~ /next/
    redirect_to prices_event_path(@event)
  else
    redirect_to event_url(@event)
  end
end