Method: EngineRoom::ModelsController#update

Defined in:
app/controllers/engine_room/models_controller.rb

#updateObject



72
73
74
75
76
77
78
79
80
# File 'app/controllers/engine_room/models_controller.rb', line 72

def update
  @element = @model.find(params[:id])
  if @element.update_attributes(params[@modelname.downcase])
    flash[:notice] = "#{@modelname} successfully updated."
    redirect_to :action => :edit
  else
    render 'edit'
  end
end