I am using everything as it is out of the box with the latest version
of 1.1.2.
# initializers/deploy.rb
no changes, although I have tried different encryption methods with no
luck
# Routes
devise_for :users
# User Model
class User < ActiveRecord::Base
devise :database_authenticatable, :registerable,
:recoverable, :rememberable, :trackable, :validatable
# Setup accessible (or protected) attributes for your model
attr_accessible :email, :password, :password_confirmation,
:remember_me, :first_name, :last_name,
:city, :postal_code, :province
def full_name
"#{first_name} #{last_name}"
end
end
# user migration
class User < ActiveRecord::Base
# Include default devise modules. Others available are:
# :token_authenticatable, :confirmable, :lockable and :timeoutable
devise :database_authenticatable, :registerable,
:recoverable, :rememberable, :trackable, :validatable
# Setup accessible (or protected) attributes for your model
attr_accessible :email, :password, :password_confirmation,
:remember_me, :first_name, :last_name,
:city, :postal_code, :province
def full_name
"#{first_name} #{last_name}"
end
end
# User migration
class DeviseCreateUsers < ActiveRecord::Migration
def self.up
create_table(:users) do |t|
t.database_authenticatable :null => false
t.recoverable
t.rememberable
t.trackable
# t.confirmable
# t.lockable :lock_strategy
=> :failed_attempts, :unlock_strategy => :both
# t.token_authenticatable
# Custom
t.string :first_name
t.string :last_name
t.string :postal_code
t.string :address
t.string :city
t.string :province
t.timestamps
end
add_index :users, :email, :unique => true
add_index :users, :reset_password_token, :unique => true
# add_index :users, :confirmation_token, :unique => true
# add_index :users, :unlock_token, :unique => true
end
def self.down
drop_table :users
end
end
# User admin flags
class AddUserAdminFlags < ActiveRecord::Migration
def self.up
add_column :users, :admin, :boolean, :default => false
add_column :users, :contributor, :boolean, :default => false
u = User.new()
u.email = "
my_e...@gmail.com"
u.admin = true
u.password = "foobar"
u.password_confirmation = "foobar"
u.first_name = "John"
u.last_name = "Smith"
u.city = "Foobar"
u.postal_code = "123 456"
u.address = "123 45st"
u.save
end
def self.down
remove_column :users, :admin
remove_column :users, :contributor
end
end
On Sep 26, 3:54 pm, Carlos Antonio da Silva
<
carlosantoniodasi...@gmail.com> wrote:
> Please, for such questions it's important that you post which devise
> version, your Model config, devise call in routes, and also if you have
> changed something inside the devise initializer, otherwise it's hard to
> think what might be going on.
>
> On Sun, Sep 26, 2010 at 6:47 PM,
nico...@w3bflows.com
> <
nico...@w3bflows.com>wrote: