Class: Spina::Admin::SettingsController

Inherits:
AdminController show all
Defined in:
app/controllers/spina/admin/settings_controller.rb

Instance Method Summary collapse

Methods inherited from AdminController

#current_admin_path

Instance Method Details

#editObject



8
9
10
# File 'app/controllers/spina/admin/settings_controller.rb', line 8

def edit
  add_breadcrumb t("spina.#{plugin.namespace}.title")
end

#updateObject



12
13
14
15
16
17
18
19
# File 'app/controllers/spina/admin/settings_controller.rb', line 12

def update
  if @setting.update(settings_params)
    redirect_to spina.admin_edit_settings_path(plugin.namespace)
  else
    add_breadcrumb t("spina.#{plugin.namespace}.title")
    render :edit
  end
end