Class: HelenaAdministration::QuestionGroupsController
Instance Method Summary
collapse
#add_breadcrumb, #set_locale
Instance Method Details
#create ⇒ Object
17
18
19
20
21
22
23
24
25
26
27
|
# File 'app/controllers/helena_administration/question_groups_controller.rb', line 17
def create
@question_group = @version.question_groups.build question_group_params
flash[:success] = t 'shared.actions.created' if @question_group.save
respond_with @question_group, location: [@survey, @version, @question_group]
end
|
#destroy ⇒ Object
47
48
49
50
|
# File 'app/controllers/helena_administration/question_groups_controller.rb', line 47
def destroy
flash[:success] = t 'shared.actions.deleted' if @question_group.destroy
respond_with @question_group, location: [@survey, @version]
end
|
#edit ⇒ Object
29
30
31
|
# File 'app/controllers/helena_administration/question_groups_controller.rb', line 29
def edit
add_breadcrumb @question_group.title
end
|
#new ⇒ Object
12
13
14
15
|
# File 'app/controllers/helena_administration/question_groups_controller.rb', line 12
def new
@question_group = @version.question_groups.build
add_breadcrumb t('.new')
end
|
#show ⇒ Object
8
9
10
|
# File 'app/controllers/helena_administration/question_groups_controller.rb', line 8
def show
add_breadcrumb @question_group.title
end
|
#update ⇒ Object
33
34
35
36
37
38
39
40
41
42
43
44
45
|
# File 'app/controllers/helena_administration/question_groups_controller.rb', line 33
def update
flash[:success] = t('shared.actions.updated') if @question_group.update_attributes(question_group_params)
respond_with @question_group, location: [@survey, @version, @question_group]
end
|