Class: Backend::EmailTemplatesController
Instance Method Summary
collapse
#update_position
#update_translation
#breadcrumb, #current_admin, #default_app_locale, #translate_notice
#crypt
Instance Method Details
#create ⇒ Object
16
17
18
19
20
21
22
23
24
|
# File 'app/controllers/backend/email_templates_controller.rb', line 16
def create
@model = EmailTemplate.new allowed_params
if @model.save
redirect_to edit_translation_backend_email_template_path(@model, translation_locale: default_app_locale), notice: translate_notice(:added, :email_template)
else
render :new
end
end
|
#index ⇒ Object
8
9
10
|
# File 'app/controllers/backend/email_templates_controller.rb', line 8
def index
@email_templates = EmailTemplate.all
end
|
#new ⇒ Object
12
13
14
|
# File 'app/controllers/backend/email_templates_controller.rb', line 12
def new
@model = EmailTemplate.new
end
|
#update ⇒ Object
26
27
28
29
30
31
32
|
# File 'app/controllers/backend/email_templates_controller.rb', line 26
def update
if @model.update_attributes allowed_params
redirect_to edit_backend_email_template_path(@model), notice: translate_notice(:edited, :email_template)
else
render :edit
end
end
|