Extract locales in accordance with Rails/I18nLocaleTexts

This commit is contained in:
Sebastian Serth
2022-03-21 09:04:01 +01:00
parent d62d18c9ff
commit ccdba79cbf
3 changed files with 9 additions and 9 deletions

View File

@ -40,7 +40,7 @@ class ErrorTemplatesController < ApplicationController
respond_to do |format|
if @error_template.save
format.html { redirect_to @error_template, notice: 'Error template was successfully created.' }
format.html { redirect_to @error_template, notice: t('shared.object_created', model: @error_template.class.model_name.human) }
format.json { render :show, status: :created, location: @error_template }
else
format.html { render :new }
@ -55,7 +55,7 @@ class ErrorTemplatesController < ApplicationController
authorize!
respond_to do |format|
if @error_template.update(error_template_params)
format.html { redirect_to @error_template, notice: 'Error template was successfully updated.' }
format.html { redirect_to @error_template, notice: t('shared.object_updated', model: @error_template.class.model_name.human) }
format.json { render :show, status: :ok, location: @error_template }
else
format.html { render :edit }
@ -70,7 +70,7 @@ class ErrorTemplatesController < ApplicationController
authorize!
@error_template.destroy
respond_to do |format|
format.html { redirect_to error_templates_url, notice: 'Error template was successfully destroyed.' }
format.html { redirect_to error_templates_url, notice: t('shared.object_destroyed', model: @error_template.class.model_name.human) }
format.json { head :no_content }
end
end