Class: ChartsController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/charts_controller.rb

Instance Method Summary collapse

Instance Method Details

#updateObject



2
3
4
5
6
7
8
9
10
11
12
# File 'app/controllers/charts_controller.rb', line 2

def update
  @chart = Chart.find(params[:id])
  authorize! :edit, @chart
  @chart.update_attributes_from_params(params[:chart])
  flash[:notice] = "Prices saved!"
  if user_requesting_next_step?
    redirect_to image_event_path(@chart.event)
  else
    redirect_to prices_event_url(@chart.event)
  end
end