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
37 38 39 40 41 42 |
# File 'app/controllers/admin/groups_controller.rb', line 37 def create @group.attributes = params[:group] @group.save respond_with(@group) end |
#destroy ⇒ Object
DELETE /groups/1
54 55 56 57 58 |
# File 'app/controllers/admin/groups_controller.rb', line 54 def destroy @group.destroy respond_with(@group) end |
#edit ⇒ Object
GET /groups/1/edit
31 32 33 |
# File 'app/controllers/admin/groups_controller.rb', line 31 def edit respond_with(@group) end |
#index ⇒ Object
GET /groups
13 14 15 |
# File 'app/controllers/admin/groups_controller.rb', line 13 def index @groups = @groups.unscoped.paginate(:page => params[:page]) end |
#new ⇒ Object
GET /groups/new
25 26 27 |
# File 'app/controllers/admin/groups_controller.rb', line 25 def new respond_with(@group) end |
#show ⇒ Object
GET /groups/1
19 20 21 |
# File 'app/controllers/admin/groups_controller.rb', line 19 def show respond_with(@group) end |
#update ⇒ Object
PUT /groups/1
46 47 48 49 50 |
# File 'app/controllers/admin/groups_controller.rb', line 46 def update @group.update_attributes(params[:group]) respond_with(@group) end |