Class: Admin::GroupsController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- Admin::GroupsController
- Defined in:
- app/controllers/admin/groups_controller.rb
Overview
Copyright © 2008-2013 Michael Dvorkin and contributors.
Fat Free CRM is freely distributable under the terms of MIT license. See MIT-LICENSE file or www.opensource.org/licenses/mit-license.php
Instance Method Summary collapse
-
#create ⇒ Object
POST /groups —————————————————————————-.
-
#destroy ⇒ Object
DELETE /groups/1 —————————————————————————-.
-
#edit ⇒ Object
GET /groups/1/edit —————————————————————————-.
-
#index ⇒ Object
GET /groups —————————————————————————-.
-
#new ⇒ Object
GET /groups/new —————————————————————————-.
-
#show ⇒ Object
GET /groups/1 —————————————————————————-.
-
#update ⇒ Object
PUT /groups/1 —————————————————————————-.
Instance Method Details
#create ⇒ Object
POST /groups
39 40 41 42 43 44 |
# File 'app/controllers/admin/groups_controller.rb', line 39 def create @group.attributes = group_params @group.save respond_with(@group) end |
#destroy ⇒ Object
DELETE /groups/1
56 57 58 59 60 |
# File 'app/controllers/admin/groups_controller.rb', line 56 def destroy @group.destroy respond_with(@group) end |
#edit ⇒ Object
GET /groups/1/edit
33 34 35 |
# File 'app/controllers/admin/groups_controller.rb', line 33 def edit respond_with(@group) end |
#index ⇒ Object
GET /groups
15 16 17 |
# File 'app/controllers/admin/groups_controller.rb', line 15 def index @groups = @groups.unscoped.paginate(page: params[:page]) end |
#new ⇒ Object
GET /groups/new
27 28 29 |
# File 'app/controllers/admin/groups_controller.rb', line 27 def new respond_with(@group) end |
#show ⇒ Object
GET /groups/1
21 22 23 |
# File 'app/controllers/admin/groups_controller.rb', line 21 def show respond_with(@group) end |
#update ⇒ Object
PUT /groups/1
48 49 50 51 52 |
# File 'app/controllers/admin/groups_controller.rb', line 48 def update @group.update(group_params) respond_with(@group) end |