Class: MetaitemsController

Inherits:
ActionController::Base
  • Object
show all
Defined in:
lib/generators/templates/metaitems_controller.rb

Instance Method Summary collapse

Instance Method Details

#editObject



7
8
9
# File 'lib/generators/templates/metaitems_controller.rb', line 7

def edit
  respond_with(@metaitem)
end

#updateObject



11
12
13
14
15
16
17
18
19
# File 'lib/generators/templates/metaitems_controller.rb', line 11

def update
  @metaitem.attributes = params[:metaitem]    
  if @metaitem.save
    flash[:notice] = "Metaitem was successfully updated."       
  else
    flash[:alert] = "Metaitem has errors."
  end
  redirect_to url_for(find_resource)
end