Class: Postnhost::TemplatesController

Inherits:
ApplicationController show all
Defined in:
app/controllers/postnhost/templates_controller.rb

Instance Method Summary collapse

Instance Method Details

#editObject



6
7
8
# File 'app/controllers/postnhost/templates_controller.rb', line 6

def edit
  @template = Postnhost::Template.current
end

#updateObject



10
11
12
13
14
15
16
17
18
# File 'app/controllers/postnhost/templates_controller.rb', line 10

def update
  @template = Postnhost::Template.current

  if @template.update(template_params)
    redirect_to edit_template_path, notice: "Template settings were successfully updated."
  else
    render :edit, status: :unprocessable_content
  end
end