lib/generators/nifty/scaffold/templates/actions/update.rb in nifty-generators-0.4.4 vs lib/generators/nifty/scaffold/templates/actions/update.rb in nifty-generators-0.4.5

- old
+ new

@@ -1,9 +1,8 @@ def update @<%= instance_name %> = <%= class_name %>.find(params[:id]) if @<%= instance_name %>.update_attributes(params[:<%= instance_name %>]) - flash[:notice] = "Successfully updated <%= class_name.underscore.humanize.downcase %>." - redirect_to <%= item_url %> + redirect_to <%= item_url %>, :notice => "Successfully updated <%= class_name.underscore.humanize.downcase %>." else render :action => 'edit' end end