0
0
Fork 0

Add titles to warning presets in admin UI (#13252)

This commit is contained in:
Eugen Rochko 2020-03-12 17:57:59 +01:00 committed by GitHub
parent aeebbe90dc
commit f556f79b77
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
56 changed files with 48 additions and 67 deletions

View file

@ -7,7 +7,7 @@ module Admin
def index
authorize :account_warning_preset, :index?
@warning_presets = AccountWarningPreset.all
@warning_presets = AccountWarningPreset.alphabetic
@warning_preset = AccountWarningPreset.new
end
@ -19,7 +19,7 @@ module Admin
if @warning_preset.save
redirect_to admin_warning_presets_path
else
@warning_presets = AccountWarningPreset.all
@warning_presets = AccountWarningPreset.alphabetic
render :index
end
end
@ -52,7 +52,7 @@ module Admin
end
def warning_preset_params
params.require(:account_warning_preset).permit(:text)
params.require(:account_warning_preset).permit(:title, :text)
end
end
end