@@ -22,46 +22,33 class GroupsController < ApplicationController | |||||
22 |
|
22 | |||
23 | helper :custom_fields |
|
23 | helper :custom_fields | |
24 |
|
24 | |||
25 | # GET /groups |
|
|||
26 | # GET /groups.xml |
|
|||
27 | def index |
|
25 | def index | |
28 | @groups = Group.find(:all, :order => 'lastname') |
|
26 | @groups = Group.find(:all, :order => 'lastname') | |
29 |
|
27 | |||
30 | respond_to do |format| |
|
28 | respond_to do |format| | |
31 |
format.html |
|
29 | format.html | |
32 | format.xml { render :xml => @groups } |
|
30 | format.xml { render :xml => @groups } | |
33 | end |
|
31 | end | |
34 | end |
|
32 | end | |
35 |
|
33 | |||
36 | # GET /groups/1 |
|
|||
37 | # GET /groups/1.xml |
|
|||
38 | def show |
|
34 | def show | |
39 | @group = Group.find(params[:id]) |
|
35 | @group = Group.find(params[:id]) | |
40 |
|
36 | |||
41 | respond_to do |format| |
|
37 | respond_to do |format| | |
42 |
format.html |
|
38 | format.html | |
43 | format.xml { render :xml => @group } |
|
39 | format.xml { render :xml => @group } | |
44 | end |
|
40 | end | |
45 | end |
|
41 | end | |
46 |
|
42 | |||
47 | # GET /groups/new |
|
|||
48 | # GET /groups/new.xml |
|
|||
49 | def new |
|
43 | def new | |
50 | @group = Group.new |
|
44 | @group = Group.new | |
51 |
|
45 | |||
52 | respond_to do |format| |
|
46 | respond_to do |format| | |
53 |
format.html |
|
47 | format.html | |
54 | format.xml { render :xml => @group } |
|
48 | format.xml { render :xml => @group } | |
55 | end |
|
49 | end | |
56 | end |
|
50 | end | |
57 |
|
51 | |||
58 | # GET /groups/1/edit |
|
|||
59 | def edit |
|
|||
60 | @group = Group.find(params[:id], :include => :projects) |
|
|||
61 | end |
|
|||
62 |
|
||||
63 | # POST /groups |
|
|||
64 | # POST /groups.xml |
|
|||
65 | def create |
|
52 | def create | |
66 | @group = Group.new |
|
53 | @group = Group.new | |
67 | @group.safe_attributes = params[:group] |
|
54 | @group.safe_attributes = params[:group] | |
@@ -80,8 +67,10 class GroupsController < ApplicationController | |||||
80 | end |
|
67 | end | |
81 | end |
|
68 | end | |
82 |
|
69 | |||
83 | # PUT /groups/1 |
|
70 | def edit | |
84 | # PUT /groups/1.xml |
|
71 | @group = Group.find(params[:id], :include => :projects) | |
|
72 | end | |||
|
73 | ||||
85 | def update |
|
74 | def update | |
86 | @group = Group.find(params[:id]) |
|
75 | @group = Group.find(params[:id]) | |
87 | @group.safe_attributes = params[:group] |
|
76 | @group.safe_attributes = params[:group] | |
@@ -98,8 +87,6 class GroupsController < ApplicationController | |||||
98 | end |
|
87 | end | |
99 | end |
|
88 | end | |
100 |
|
89 | |||
101 | # DELETE /groups/1 |
|
|||
102 | # DELETE /groups/1.xml |
|
|||
103 | def destroy |
|
90 | def destroy | |
104 | @group = Group.find(params[:id]) |
|
91 | @group = Group.find(params[:id]) | |
105 | @group.destroy |
|
92 | @group.destroy |
General Comments 0
You need to be logged in to leave comments.
Login now