[refs #128] Fix devise mails. Fix confirm ability

This commit is contained in:
konstantin.grabar 2012-03-26 18:33:02 +04:00
parent a3d334f0c2
commit ae0ca1ce99
6 changed files with 24 additions and 12 deletions

View File

@ -6,7 +6,7 @@ class User < ActiveRecord::Base
MAX_AVATAR_SIZE = 5.megabyte
devise :database_authenticatable, :registerable, :omniauthable, # :token_authenticatable, :encryptable, :timeoutable
:recoverable, :rememberable, :validatable, :lockable, :confirmable, :reconfirmable #, :trackable, , :lockable
:recoverable, :rememberable, :validatable, :lockable, :confirmable#, :reconfirmable, :trackable
has_attached_file :avatar, :styles =>
{ :micro => { :geometry => "16x16#", :format => :jpg, :convert_options => '-strip -background white -flatten -quality 70'},
:small => { :geometry => "30x30#", :format => :jpg, :convert_options => '-strip -background white -flatten -quality 70'},

View File

@ -2,3 +2,5 @@
Welcome #{@resource.email}!
%p You can confirm your account through the link below:
%p= link_to 'Confirm my account', confirmation_url(@resource, :confirmation_token => @resource.confirmation_token)
%br
%p== Support team «ROSA ABF»

View File

@ -4,3 +4,5 @@
%p= link_to 'Change my password', edit_password_url(@resource, :reset_password_token => @resource.reset_password_token)
%p If you didn't request this, please ignore this email.
%p Your password won't change until you access the link above and create a new one.
%br
%p== Support team «ROSA ABF»

View File

@ -3,3 +3,5 @@
%p Your account has been locked due to an excessive amount of unsuccessful sign in attempts.
%p Click the link below to unlock your account:
%p= link_to 'Unlock my account', unlock_url(@resource, :unlock_token => @resource.unlock_token)
%br
%p== Support team «ROSA ABF»

View File

@ -0,0 +1,8 @@
class ConfirmAllRegisteredUsers < ActiveRecord::Migration
def up
User.all.each { |user| user.confirm! }
end
def down
end
end

View File

@ -11,14 +11,14 @@
#
# It's strongly recommended to check this file into your version control system.
ActiveRecord::Schema.define(:version => 20120321130436) do
ActiveRecord::Schema.define(:version => 20120326142636) do
create_table "activity_feeds", :force => true do |t|
t.integer "user_id", :null => false
t.string "kind"
t.text "data"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.datetime "created_at"
t.datetime "updated_at"
end
create_table "arches", :force => true do |t|
@ -286,26 +286,23 @@ ActiveRecord::Schema.define(:version => 20120321130436) do
t.text "description"
t.string "ancestry"
t.boolean "has_issues", :default => true
t.boolean "has_wiki", :default => false
t.string "srpm_file_name"
t.string "srpm_content_type"
t.integer "srpm_file_size"
t.datetime "srpm_updated_at"
t.boolean "has_wiki", :default => false
t.string "default_branch", :default => "master"
t.boolean "is_rpm", :default => true
end
add_index "projects", ["category_id"], :name => "index_projects_on_category_id"
add_index "projects", ["owner_id"], :name => "index_projects_on_name_and_owner_id_and_owner_type", :unique => true, :case_sensitive => false
create_table "register_requests", :force => true do |t|
t.string "name"
t.string "email"
t.string "token"
t.boolean "approved", :default => false
t.boolean "rejected", :default => false
t.datetime "created_at"
t.datetime "updated_at"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.string "interest"
t.text "more"
end
@ -370,18 +367,19 @@ ActiveRecord::Schema.define(:version => 20120321130436) do
t.string "name"
t.string "email", :default => "", :null => false
t.string "encrypted_password", :limit => 128, :default => "", :null => false
t.string "password_salt", :default => "", :null => false
t.string "reset_password_token"
t.datetime "remember_created_at"
t.datetime "created_at"
t.datetime "updated_at"
t.text "ssh_key"
t.string "uname"
t.string "role"
t.string "language", :default => "en"
t.string "confirmation_token"
t.datetime "confirmed_at"
t.datetime "confirmation_sent_at"
t.datetime "reset_password_sent_at"
t.integer "own_projects_count", :default => 0, :null => false
t.datetime "reset_password_sent_at"
t.text "professional_experience"
t.string "site"
t.string "company"