Class: Admin::SettingsController
Instance Method Summary
collapse
Methods included from BlogHelper
#blog_base_url, #this_blog
Instance Method Details
#display ⇒ Object
17
18
19
|
# File 'app/controllers/admin/settings_controller.rb', line 17
def display
load_settings
end
|
#feedback ⇒ Object
13
14
15
|
# File 'app/controllers/admin/settings_controller.rb', line 13
def feedback
load_settings
end
|
#index ⇒ Object
4
5
6
7
|
# File 'app/controllers/admin/settings_controller.rb', line 4
def index
this_blog.base_url = blog_base_url if this_blog.base_url.blank?
load_settings
end
|
#update ⇒ Object
21
22
23
24
25
26
27
28
29
30
31
32
|
# File 'app/controllers/admin/settings_controller.rb', line 21
def update
load_settings
if @setting.update(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
9
10
11
|
# File 'app/controllers/admin/settings_controller.rb', line 9
def write
load_settings
end
|