Class: Plugins::Attack::AdminController
Instance Method Summary
collapse
#ajax, #cama_get_i18n_frontend, #dashboard, #index, #search
Instance Method Details
#save_settings ⇒ Object
8
9
10
11
12
13
14
15
16
17
18
19
20
|
# File 'app/apps/plugins/attack/admin_controller.rb', line 8
def save_settings
current_site.set_meta(
'attack_config', {
get: { sec: params[:attack][:get_sec], max: params[:attack][:get_max] },
post: { sec: params[:attack][:post_sec] || 20, max: params[:attack][:post_max] },
msg: params[:attack][:msg],
ban: params[:attack][:ban],
cleared: Time.zone.now.iso8601
}
)
flash[:notice] = t('plugin.attack.messages.settings_saved').to_s
redirect_to action: :settings
end
|
#settings ⇒ Object
4
5
6
|
# File 'app/apps/plugins/attack/admin_controller.rb', line 4
def settings
@attack = current_site.get_meta('attack_config')
end
|