Class: Admin::ResourceController
- Inherits:
-
BaseController
- Object
- BaseController
- Admin::ResourceController
- Defined in:
- lib/generators/admin_interface/templates/setup/controllers/resource_controller.rb
Instance Method Summary collapse
-
#destroy_all ⇒ Object
inherited_resources options nested_belongs_to :user, :optional => true.
Instance Method Details
#destroy_all ⇒ Object
inherited_resources options nested_belongs_to :user, :optional => true
9 10 11 12 13 |
# File 'lib/generators/admin_interface/templates/setup/controllers/resource_controller.rb', line 9 def destroy_all destroyed_resources = resource_class.destroy_all(:id => params[:ids]) flash[:notice] = "#{destroyed_resources.size} objects destroyed." redirect_to :back end |