Class Admin::GroupsController
In: app/controllers/admin/groups_controller.rb
Parent: Admin::BaseController

Methods

create   destroy   edit   index   new   show   update  

Public Instance methods

POST /admin/groups POST /admin/groups.xml

[Source]

    # File app/controllers/admin/groups_controller.rb, line 42
42:   def create
43:     @group = Group.new(params[:group])
44: 
45:     respond_to do |format|
46:       if @group.save
47:         update_translations(params, @group, 'Group')
48:         flash[:notice] = 'Group was successfully created.'
49:         format.html { redirect_to(admin_group_path(@group)) }
50:         format.xml  { render :xml => @group, :status => :created, :location => @group }
51:       else
52:         format.html { render :action => "new" }
53:         format.xml  { render :xml => @group.errors, :status => :unprocessable_entity }
54:       end
55:     end
56:   end

DELETE /admin/groups/1 DELETE /admin/groups/1.xml

[Source]

    # File app/controllers/admin/groups_controller.rb, line 78
78:   def destroy
79:     @group = Group.find(params[:id])
80:     @group.destroy
81: 
82:     respond_to do |format|
83:       format.html { redirect_to(admin_groups_path) }
84:       format.xml  { head :ok }
85:     end
86:   end

GET /admin/groups/1/edit

[Source]

    # File app/controllers/admin/groups_controller.rb, line 36
36:   def edit
37:     @group = Group.find(params[:id])
38:   end

GET /admin/groups GET /admin/groups.xml

[Source]

    # File app/controllers/admin/groups_controller.rb, line 4
 4:   def index
 5:     @groups = Group.find(:all)
 6: 
 7:     respond_to do |format|
 8:       format.html # index.html.erb
 9:       format.xml  { render :xml => @groups }
10:     end
11:   end

GET /admin/groups/new GET /admin/groups/new.xml

[Source]

    # File app/controllers/admin/groups_controller.rb, line 26
26:   def new
27:     @group = Group.new
28: 
29:     respond_to do |format|
30:       format.html # new.html.erb
31:       format.xml  { render :xml => @group }
32:     end
33:   end

GET /admin/groups/1 GET /admin/groups/1.xml

[Source]

    # File app/controllers/admin/groups_controller.rb, line 15
15:   def show
16:     @group = Group.find(params[:id])
17: 
18:     respond_to do |format|
19:       format.html # show.html.erb
20:       format.xml  { render :xml => @group }
21:     end
22:   end

PUT /admin/groups/1 PUT /admin/groups/1.xml

[Source]

    # File app/controllers/admin/groups_controller.rb, line 60
60:   def update
61:     @group = Group.find(params[:id])
62: 
63:     respond_to do |format|
64:       if @group.update_attributes(params[:group])
65:         update_translations(params, @group, 'Group')
66:         flash[:notice] = 'Group was successfully updated.'
67:         format.html { redirect_to(admin_group_path(@group)) }
68:         format.xml  { head :ok }
69:       else
70:         format.html { render :action => "edit" }
71:         format.xml  { render :xml => @group.errors, :status => :unprocessable_entity }
72:       end
73:     end
74:   end

[Validate]