Class: Gluttonberg::Admin::Membership::GroupsController
- Inherits:
-
BaseController
- Object
- ActionController::Base
- BaseController
- BaseController
- BaseController
- Gluttonberg::Admin::Membership::GroupsController
- Defined in:
- app/controllers/gluttonberg/admin/membership/groups_controller.rb
Instance Method Summary collapse
- #create ⇒ Object
- #delete ⇒ Object
- #destroy ⇒ Object
- #edit ⇒ Object
- #index ⇒ Object
- #new ⇒ Object
- #update ⇒ Object
Instance Method Details
#create ⇒ Object
20 21 22 23 24 25 26 |
# File 'app/controllers/gluttonberg/admin/membership/groups_controller.rb', line 20 def create @group = Group.new(params[:gluttonberg_group]) generic_create(@group, { :name => "group", :success_path => admin_membership_groups_path }) end |
#delete ⇒ Object
39 40 41 42 43 44 45 |
# File 'app/controllers/gluttonberg/admin/membership/groups_controller.rb', line 39 def delete display_delete_confirmation( :title => "Delete “#{@group.name}” group?", :url => admin_membership_group_path(@group), :return_url => admin_membership_groups_path ) end |
#destroy ⇒ Object
47 48 49 50 51 52 53 |
# File 'app/controllers/gluttonberg/admin/membership/groups_controller.rb', line 47 def destroy generic_destroy(@group, { :name => "group", :success_path => admin_groups_path, :failure_path => admin_groups_path }) end |
#edit ⇒ Object
28 29 |
# File 'app/controllers/gluttonberg/admin/membership/groups_controller.rb', line 28 def edit end |
#index ⇒ Object
12 13 14 |
# File 'app/controllers/gluttonberg/admin/membership/groups_controller.rb', line 12 def index @groups = Group.all end |
#new ⇒ Object
16 17 18 |
# File 'app/controllers/gluttonberg/admin/membership/groups_controller.rb', line 16 def new @group = Group.new end |
#update ⇒ Object
31 32 33 34 35 36 37 |
# File 'app/controllers/gluttonberg/admin/membership/groups_controller.rb', line 31 def update @group.assign_attributes(params[:gluttonberg_group]) generic_update(@group, { :name => "group", :success_path => admin_membership_groups_path }) end |