lib/templates/actions/destroy.rb in thesilverspoon-0.0.22 vs lib/templates/actions/destroy.rb in thesilverspoon-0.0.23
- old
+ new
@@ -1,5 +1,10 @@
def destroy
@<%= instance_name %> = <%= class_name %>.find(params[:id])
@<%= instance_name %>.destroy
+if !params[:integrated_view].nil?
+
+ redirect_to <%= item_resource.pluralize %>_integrated_view_path, :notice => "Successfully destroyed <%= class_name.underscore.humanize.downcase %>."
+else
redirect_to <%= items_url %>, :notice => "Successfully destroyed <%= class_name.underscore.humanize.downcase %>."
-end
\ No newline at end of file
+end
+end