Class: Para::Admin::SettingsComponentController

Inherits:
ComponentController show all
Defined in:
app/controllers/para/admin/settings_component_controller.rb

Instance Method Summary collapse

Methods inherited from BaseController

#current_ability, #current_admin

Methods included from BaseHelper

#find_partial_for, #find_relation_name_for, #flash_message, #registered_components_options, #resource_title_for, #template_path_lookup

Methods included from Helpers::ResourceName

#resource_name

Methods inherited from Para::ApplicationController

#admin?

Instance Method Details

#showObject



4
5
6
# File 'app/controllers/para/admin/settings_component_controller.rb', line 4

def show
  @settings = SettingsRails::Form.new
end

#updateObject



8
9
10
11
12
13
14
# File 'app/controllers/para/admin/settings_component_controller.rb', line 8

def update
  form = SettingsRails::Form.new
  form.settings_attributes = settings_params[:settings_attributes]
  form.save
  flash_message(:success, form)
  redirect_to admin_settings_path(@component), status: 303
end