Use double quotes in controllers/

This commit is contained in:
Julian Herrero
2019-03-13 22:19:49 +01:00
parent 3c313c9c52
commit d24376f6ad
78 changed files with 236 additions and 236 deletions

View File

@@ -7,9 +7,9 @@ class Verification::EmailController < ApplicationController
def show
if Verification::Email.find(current_user, params[:email_verification_token])
current_user.update(verified_at: Time.current)
redirect_to account_path, notice: t('verification.email.show.flash.success')
redirect_to account_path, notice: t("verification.email.show.flash.success")
else
redirect_to verified_user_path, alert: t('verification.email.show.alert.failure')
redirect_to verified_user_path, alert: t("verification.email.show.alert.failure")
end
end
@@ -22,9 +22,9 @@ class Verification::EmailController < ApplicationController
@email.encrypted_token,
@verified_user.document_type,
@verified_user.document_number).deliver_later
redirect_to account_path, notice: t('verification.email.create.flash.success', email: @verified_user.email)
redirect_to account_path, notice: t("verification.email.create.flash.success", email: @verified_user.email)
else
redirect_to verified_user_path, alert: t('verification.email.create.alert.failure')
redirect_to verified_user_path, alert: t("verification.email.create.alert.failure")
end
end

View File

@@ -30,7 +30,7 @@ class Verification::LetterController < ApplicationController
@letter = Verification::Letter.new(letter_params.merge(user: current_user, verify: true))
if @letter.valid?
current_user.update(verified_at: Time.current)
redirect_to account_path, notice: t('verification.letter.update.flash.success')
redirect_to account_path, notice: t("verification.letter.update.flash.success")
else
Lock.increase_tries(@letter.user) if @letter.user
render :edit
@@ -45,7 +45,7 @@ class Verification::LetterController < ApplicationController
def verify_phone!
unless current_user.sms_verified?
redirect_to verified_user_path, alert: t('verification.letter.alert.unconfirmed_code')
redirect_to verified_user_path, alert: t("verification.letter.alert.unconfirmed_code")
end
end

View File

@@ -11,7 +11,7 @@ class Verification::ResidenceController < ApplicationController
def create
@residence = Verification::Residence.new(residence_params.merge(user: current_user))
if @residence.save
redirect_to verified_user_path, notice: t('verification.residence.create.flash.success')
redirect_to verified_user_path, notice: t("verification.residence.create.flash.success")
else
render :new
end
@@ -22,4 +22,4 @@ class Verification::ResidenceController < ApplicationController
def residence_params
params.require(:residence).permit(:document_number, :document_type, :date_of_birth, :postal_code, :terms_of_service)
end
end
end

View File

@@ -14,7 +14,7 @@ class Verification::SmsController < ApplicationController
def create
@sms = Verification::Sms.new(phone: @phone, user: current_user)
if @sms.save
redirect_to edit_sms_path, notice: t('verification.sms.create.flash.success')
redirect_to edit_sms_path, notice: t("verification.sms.create.flash.success")
else
render :new
end
@@ -36,7 +36,7 @@ class Verification::SmsController < ApplicationController
redirect_to_next_path
else
@error = t('verification.sms.update.error')
@error = t("verification.sms.update.error")
render :edit
end
end
@@ -63,9 +63,9 @@ class Verification::SmsController < ApplicationController
def redirect_to_next_path
current_user.reload
if current_user.level_three_verified?
redirect_to account_path, notice: t('verification.sms.update.flash.level_three.success')
redirect_to account_path, notice: t("verification.sms.update.flash.level_three.success")
else
redirect_to new_letter_path, notice: t('verification.sms.update.flash.level_two.success')
redirect_to new_letter_path, notice: t("verification.sms.update.flash.level_two.success")
end
end