forked from fixin.me/fixin.me
Merge recover password/resend confirmation forms into sign in/register
Closes #65, #66
This commit is contained in:
@@ -91,7 +91,7 @@ Devise.setup do |config|
|
||||
# It will change confirmation, password recovery and other workflows
|
||||
# to behave the same regardless if the e-mail provided was right or wrong.
|
||||
# Does not affect registerable.
|
||||
# config.paranoid = true
|
||||
config.paranoid = true
|
||||
|
||||
# By default Devise will store the user in session. You can skip storage for
|
||||
# particular strategies by setting this option.
|
||||
|
||||
@@ -4,15 +4,15 @@ en:
|
||||
devise:
|
||||
confirmations:
|
||||
confirmed: "Your email address has been successfully confirmed."
|
||||
send_instructions: "You will receive an email with instructions for how to confirm your email address in a few minutes."
|
||||
send_paranoid_instructions: "If your email address exists in our database, you will receive an email with instructions for how to confirm your email address in a few minutes."
|
||||
send_paranoid_instructions: >
|
||||
If your email address is in our database, a message with instructions on how
|
||||
to confirm your email address has been sent to you.
|
||||
failure:
|
||||
already_authenticated: "You are already signed in."
|
||||
inactive: "Your account is not activated yet."
|
||||
invalid: "Invalid %{authentication_keys} or password."
|
||||
invalid: "Invalid <b>%{authentication_keys}</b> or <b>password</b>."
|
||||
locked: "Your account is locked."
|
||||
last_attempt: "You have one more attempt before your account is locked."
|
||||
not_found_in_database: "Invalid %{authentication_keys} or password."
|
||||
timeout: "Your session expired. Please sign in again to continue."
|
||||
unauthenticated: "You need to sign in or sign up before continuing."
|
||||
unconfirmed: "You have to confirm your email address before continuing."
|
||||
@@ -32,8 +32,9 @@ en:
|
||||
success: "Successfully authenticated from %{kind} account."
|
||||
passwords:
|
||||
no_token: "You can't access this page without coming from a password reset email. If you do come from a password reset email, please make sure you used the full URL provided."
|
||||
send_instructions: "You will receive an email with instructions on how to reset your password in a few minutes."
|
||||
send_paranoid_instructions: "If your email address exists in our database, you will receive a password recovery link at your email address in a few minutes."
|
||||
send_paranoid_instructions: >
|
||||
If your email address is in our database, the password recovery link has been
|
||||
sent to you.
|
||||
updated: "Your password has been changed successfully. You are now signed in."
|
||||
updated_not_active: "Your password has been changed successfully."
|
||||
registrations:
|
||||
@@ -50,7 +51,6 @@ en:
|
||||
signed_out: "Signed out successfully."
|
||||
already_signed_out: "Signed out successfully."
|
||||
unlocks:
|
||||
send_instructions: "You will receive an email with instructions for how to unlock your account in a few minutes."
|
||||
send_paranoid_instructions: "If your account exists, you will receive an email with instructions for how to unlock it in a few minutes."
|
||||
unlocked: "Your account has been unlocked successfully. Please sign in to continue."
|
||||
errors:
|
||||
|
||||
@@ -150,7 +150,7 @@ en:
|
||||
edit:
|
||||
password_html: 'New password:%{password_length_hint_html}'
|
||||
update_password: Update password
|
||||
registrations:
|
||||
profiles:
|
||||
new:
|
||||
password_html: 'Password:%{password_length_hint_html}'
|
||||
password_confirmation: 'Retype password:'
|
||||
@@ -169,7 +169,6 @@ en:
|
||||
cancel: Cancel
|
||||
delete: Delete
|
||||
:no: 'no'
|
||||
or: or
|
||||
register: Register
|
||||
sign_in: Sign in
|
||||
recover_password: Recover password
|
||||
|
||||
@@ -24,8 +24,9 @@ Rails.application.routes.draw do
|
||||
# https://github.com/heartcombo/devise/issues/5786
|
||||
connection = ActiveRecord::Base.connection
|
||||
if connection.schema_version && connection.table_exists?(:users)
|
||||
# NOTE: change helper prefix from *_registration to *_profile once possible
|
||||
devise_for :users, path: '', path_names: {registration: 'profile'},
|
||||
controllers: {registrations: :registrations}
|
||||
controllers: {registrations: 'user/profiles'}
|
||||
end
|
||||
|
||||
resources :users, only: [:index, :show, :update] do
|
||||
@@ -34,9 +35,7 @@ Rails.application.routes.draw do
|
||||
end
|
||||
|
||||
unauthenticated do
|
||||
as :user do
|
||||
root to: redirect('/sign_in')
|
||||
end
|
||||
root to: redirect('/sign_in')
|
||||
end
|
||||
root to: redirect('/units'), as: :user_root
|
||||
|
||||
|
||||
Reference in New Issue
Block a user