custom-template 0.1.7 → 0.1.8
Sign up to get free protection for your applications and to get access to all the features.
@@ -60,7 +60,7 @@ class <%= controller_class_name %>Controller < ApplicationController
|
|
60
60
|
#---------#
|
61
61
|
def destroy( id )
|
62
62
|
<%= singular_table_name %> = <%= "#{class_name}.where( id: id, user_id: session[:user_id] ).first" %>
|
63
|
-
<%= orm_instance.
|
63
|
+
<%= orm_instance.destroy %> ? flash[:notice] = <%= "\"#{human_name} was successfully deleted.\"" %> : flash[:alert] = <%= "\"#{human_name} was failed deleted.\"" %>
|
64
64
|
|
65
65
|
redirect_to <%= plural_table_name %>_path
|
66
66
|
end
|