Permalink
Browse files

confirmation added

  • Loading branch information...
1 parent 2922dc0 commit 4c1b1b370c1e003a3a60d1a264a765df559b90a3 @saks committed Mar 30, 2012
View
@@ -5,7 +5,7 @@ class User < ActiveRecord::Base
# Include default devise modules. Others available are:
# :token_authenticatable, :confirmable, :lockable, :timeoutable and :omniauthable
devise :database_authenticatable, :registerable,
- :recoverable, :rememberable, :trackable, :validatable
+ :recoverable, :rememberable, :trackable, :validatable, :confirmable
# Setup accessible (or protected) attributes for your model
attr_accessible :email, :password, :password_confirmation, :remember_me, :first_name,
@@ -0,0 +1,17 @@
+<% unless flash[:notice].blank? %>
+ <div class="alert-info alert">
+ <%= content_tag :div, flash[:notice] %>
+ </div>
+<% end %>
+
+<% unless flash[:error].blank? %>
+ <div class="alert-error alert">
+ <%= content_tag :div, flash[:error] %>
+ </div>
+<% end %>
+
+<% unless flash[:alert].blank? %>
+ <div class="alert">
+ <%= content_tag :div, flash[:alert] %>
+ </div>
+<% end %>
@@ -60,6 +60,7 @@
</div>
<div class="span1">&nbsp;</div>
<div class="span9">
+ <%= render partial: 'flashes' %>
<%= yield %>
</div>
</div>
View
@@ -100,6 +100,52 @@ ru:
change_my_password: 'Изменить мой пароль'
new_password: 'Новый пароль'
+ failure:
+ already_authenticated: 'You are already signed in.'
+ unauthenticated: 'You need to sign in or sign up before continuing.'
+ unconfirmed: 'You have to confirm your account before continuing.'
+ locked: 'Your account is locked.'
+ invalid: 'Invalid email or password.'
+ invalid_token: 'Invalid authentication token.'
+ timeout: 'Your session expired, please sign in again to continue.'
+ inactive: 'Your account was not activated yet.'
+ sessions:
+ signed_in: 'Signed in successfully.'
+ signed_out: 'Signed out successfully.'
+ passwords:
+ send_instructions: 'You will receive an email with instructions about how to reset your password in a few minutes.'
+ updated: 'Your password was changed successfully. You are now signed in.'
+ updated_not_active: 'Your password was changed successfully.'
+ send_paranoid_instructions: "If your e-mail exists on our database, you will receive a password recovery link on your e-mail"
+ confirmations:
+ send_instructions: 'You will receive an email with instructions about how to confirm your account in a few minutes.'
+ send_paranoid_instructions: 'If your e-mail exists on our database, you will receive an email with instructions about how to confirm your account in a few minutes.'
+ confirmed: 'Ваша учётная запись успешно подтверждена. Вы вошли на сайт. Скоро с Вами свяжется администратор, для подтверждения
+ введённых Вами данных и окончатия активации учётной записи. Если у Вас есть вопросы - обратитесь в ТС.'
+ registrations:
+ signed_up: 'Welcome! You have signed up successfully.'
+ signed_up_but_unconfirmed: 'Сообщение сожержащее ссылку для подверждения созданной учётной записи скоро появится в Вашем электронном почтовом ящике.
+ Пожалуйста, пройдите по этой ссылке, что бы активировать Вашу учётную запись.'
+ signed_up_but_inactive: 'You have signed up successfully. However, we could not sign you in because your account is not yet activated.'
+ signed_up_but_locked: 'You have signed up successfully. However, we could not sign you in because your account is locked.'
+ updated: 'You updated your account successfully.'
+ update_needs_confirmation: "You updated your account successfully, but we need to verify your new email address. Please check your email and click on the confirm link to finalize confirming your new email address."
+ destroyed: 'Bye! Your account was successfully cancelled. We hope to see you again soon.'
+ unlocks:
+ send_instructions: 'You will receive an email with instructions about how to unlock your account in a few minutes.'
+ unlocked: 'Your account has been unlocked successfully. Please sign in to continue.'
+ send_paranoid_instructions: 'If your account exists, you will receive an email with instructions about how to unlock it in a few minutes.'
+ omniauth_callbacks:
+ success: 'Successfully authorized from %{kind} account.'
+ failure: 'Could not authorize you from %{kind} because "%{reason}".'
+ mailer:
+ confirmation_instructions:
+ subject: 'Confirmation instructions'
+ reset_password_instructions:
+ subject: 'Reset password instructions'
+ unlock_instructions:
+ subject: 'Unlock Instructions'
+
######################## SIMPLE FORM ###############################
simple_form:
@@ -38,10 +38,10 @@ def change
t.string :password_salt
## Confirmable
- # t.string :confirmation_token
- # t.datetime :confirmed_at
- # t.datetime :confirmation_sent_at
- # t.string :unconfirmed_email # Only if using reconfirmable
+ t.string :confirmation_token
+ t.datetime :confirmed_at
+ t.datetime :confirmation_sent_at
+ t.string :unconfirmed_email # Only if using reconfirmable
## Lockable
# t.integer :failed_attempts, :default => 0 # Only if lock strategy is :failed_attempts
View
@@ -51,6 +51,10 @@
t.string "current_sign_in_ip"
t.string "last_sign_in_ip"
t.string "password_salt"
+ t.string "confirmation_token"
+ t.datetime "confirmed_at"
+ t.datetime "confirmation_sent_at"
+ t.string "unconfirmed_email"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
end

0 comments on commit 4c1b1b3

Please sign in to comment.