def update @<%= instance_name %> = <%= model_name %>.find(params[:id]) if @<%= instance_name %>.update_attributes(params[:<%= instance_name %>]) redirect_to <%= item_url %>, :notice => "Successfully updated <%= model_name.underscore.humanize.downcase %>." else render :edit end end