Class: Admin::SettingsController
Instance Method Summary
collapse
Methods included from BlogHelper
#blog_base_url, #this_blog
Instance Method Details
#display ⇒ Object
15
16
17
|
# File 'app/controllers/admin/settings_controller.rb', line 15
def display
load_settings
end
|
#feedback ⇒ Object
11
12
13
|
# File 'app/controllers/admin/settings_controller.rb', line 11
def feedback
load_settings
end
|
#index ⇒ Object
2
3
4
5
|
# File 'app/controllers/admin/settings_controller.rb', line 2
def index
this_blog.base_url = blog_base_url if this_blog.base_url.blank?
load_settings
end
|
#update ⇒ Object
19
20
21
22
23
24
25
26
27
28
29
30
|
# File 'app/controllers/admin/settings_controller.rb', line 19
def update
load_settings
if @setting.update_attributes(settings_params)
load_lang
flash[:success] = I18n.t('admin.settings.update.success')
redirect_to action: action_param
else
flash[:error] = I18n.t('admin.settings.update.error',
messages: this_blog.errors.full_messages.join(', '))
render action_param
end
end
|
#write ⇒ Object
7
8
9
|
# File 'app/controllers/admin/settings_controller.rb', line 7
def write
load_settings
end
|