Class: AdminController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- AdminController
show all
- Defined in:
- lib/generators/flexible_admin/templates/admin_controller.rb
Instance Method Summary
collapse
Instance Method Details
#index ⇒ Object
4
5
|
# File 'lib/generators/flexible_admin/templates/admin_controller.rb', line 4
def index
end
|
#toggle ⇒ Object
7
8
9
10
11
12
|
# File 'lib/generators/flexible_admin/templates/admin_controller.rb', line 7
def toggle
@resource = resource
@resource.toggle(params[:field])
@resource.save
redirect_to :back, :notice => "#{resource.class.to_s} successfully updated"
end
|