mirror of
https://github.com/we-promise/sure.git
synced 2026-04-07 14:31:25 +00:00
Centralize auth messages (#269)
* Add i18n-tasks * Add auth-related i18n * Centralize auth messages * Remove safe navigation * Revert "Remove safe navigation" This reverts commit 56b5e01e5e0ab9f54a9a5d9f5559e29897d239a4. * Remove newline in Gemfile
This commit is contained in:
@@ -14,10 +14,10 @@ class RegistrationsController < ApplicationController
|
||||
|
||||
if @user.save
|
||||
login @user
|
||||
flash[:notice] = "You have signed up successfully."
|
||||
flash[:notice] = t(".success")
|
||||
redirect_to root_path
|
||||
else
|
||||
flash[:alert] = "Invalid input, please try again."
|
||||
flash[:alert] = t(".failure")
|
||||
render :new
|
||||
end
|
||||
end
|
||||
@@ -34,7 +34,7 @@ class RegistrationsController < ApplicationController
|
||||
|
||||
def claim_invite_code
|
||||
unless InviteCode.claim! params[:user][:invite_code]
|
||||
redirect_to new_registration_path, alert: "Invalid invite code, please try again."
|
||||
redirect_to new_registration_path, alert: t("registrations.create.invalid_invite_code")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user