Class: MailEngine::MailTemplateFilesController
Constant Summary
Constants included
from MailEngine
PLACEHOLDERS_IN_LAYOUT, VERSION
Instance Method Summary
collapse
#close_modal_and_refresh
Instance Method Details
#create ⇒ Object
18
19
20
21
22
23
24
25
|
# File 'app/controllers/mail_engine/mail_template_files_controller.rb', line 18
def create
@mail_template_file = @mail_template.mail_template_files.build(params[:mail_engine_mail_template_file])
if @mail_template_file.save
close_modal_and_refresh
else
render :new
end
end
|
#destroy ⇒ Object
35
36
37
38
|
# File 'app/controllers/mail_engine/mail_template_files_controller.rb', line 35
def destroy
@mail_template_file.destroy
render :js => "window.location.reload()"
end
|
#edit ⇒ Object
8
9
|
# File 'app/controllers/mail_engine/mail_template_files_controller.rb', line 8
def edit
end
|
#index ⇒ Object
5
6
|
# File 'app/controllers/mail_engine/mail_template_files_controller.rb', line 5
def index
end
|
#new ⇒ Object
14
15
16
|
# File 'app/controllers/mail_engine/mail_template_files_controller.rb', line 14
def new
@mail_template_file = @mail_template.mail_template_files.new
end
|
#show ⇒ Object
11
12
|
# File 'app/controllers/mail_engine/mail_template_files_controller.rb', line 11
def show
end
|
#update ⇒ Object
27
28
29
30
31
32
33
|
# File 'app/controllers/mail_engine/mail_template_files_controller.rb', line 27
def update
if @mail_template_file.update_attributes(params[:mail_engine_mail_template_file])
close_modal_and_refresh
else
render :edit
end
end
|