lib/generators/ouvrages/controller/templates/controller.rb in ouvrages_scaffold-0.1.0 vs lib/generators/ouvrages/controller/templates/controller.rb in ouvrages_scaffold-0.1.1
- old
+ new
@@ -69,10 +69,10 @@
# DELETE <%= route_url %>/1.json
def destroy
@<%= orm_instance.destroy %>
respond_to do |format|
- format.html { redirect_to <%= index_helper %>_url }
+ format.html { redirect_to <%= index_helper %>_url, flash: {success: t("<%= plural_table_name %>.removed")} }
format.json { head :no_content }
end
end
end
<% end -%>
\ No newline at end of file