Skip to content

Commit

Permalink
NoMethodError on localhost: Undefined method password_salt
Browse files Browse the repository at this point in the history
  • Loading branch information
La-comadreja committed Jan 23, 2013
1 parent 8e8e61f commit 93cdac1
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Gemfile.lock
Expand Up @@ -157,7 +157,7 @@ GEM
pry (~> 0.9.10)
pry-rails (0.2.2)
pry (>= 0.9.10)
rack (1.2.6)
rack (1.2.7)
rack-mount (0.6.14)
rack (>= 1.0.0)
rack-test (0.5.7)
Expand Down
1 change: 1 addition & 0 deletions app/models/user.rb
Expand Up @@ -33,6 +33,7 @@ class User < ActiveRecord::Base
# last_sign_in_at : datetime
# current_sign_in_ip : string
# last_sign_in_ip : string
# salt : string
# =======================

# Include default devise modules. Others available are:
Expand Down
3 changes: 2 additions & 1 deletion db/migrate/20120812151425_add_devise_to_users.rb
Expand Up @@ -6,14 +6,15 @@ def self.up
# t.rememberable
# t.trackable

# t.encryptable
t.encryptable
# t.confirmable
# t.lockable :lock_strategy => :failed_attempts, :unlock_strategy => :both
# t.token_authenticatable


# Uncomment below if timestamps were not included in your original model.
# t.timestamps
t.string :password_salt
end

# add_index :users, :email, :unique => true
Expand Down
12 changes: 6 additions & 6 deletions db/migrate/20121202224402_devise_create_users.rb
Expand Up @@ -2,11 +2,11 @@ class DeviseCreateUsers < ActiveRecord::Migration
def self.up
change_table(:users) do |t|
# t.database_authenticatable :null => false
# t.recoverable
# t.rememberable
# t.trackable
t.recoverable
t.rememberable
t.trackable

# t.encryptable
t.encryptable
# t.confirmable
# t.lockable :lock_strategy => :failed_attempts, :unlock_strategy => :both
# t.token_authenticatable
Expand All @@ -16,8 +16,8 @@ def self.up
# t.timestamps
end

# add_index :users, :email, :unique => true
# add_index :users, :reset_password_token, :unique => true
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
# add_index :users, :authentication_token, :unique => true
Expand Down
9 changes: 9 additions & 0 deletions db/migrate/20130123182620_add_salt_to_users.rb
@@ -0,0 +1,9 @@
class AddSaltToUsers < ActiveRecord::Migration
def self.up
add_column :users, :salt, :string
end

def self.down
remove_column :users, :salt
end
end
3 changes: 2 additions & 1 deletion db/schema.rb
Expand Up @@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.

ActiveRecord::Schema.define(:version => 20121229233342) do
ActiveRecord::Schema.define(:version => 20130123182620) do

create_table "applics", :force => true do |t|
t.integer "job_id"
Expand Down Expand Up @@ -252,6 +252,7 @@
t.datetime "last_sign_in_at"
t.string "current_sign_in_ip"
t.string "last_sign_in_ip"
t.string "salt"
end

add_index "users", ["email"], :name => "index_users_on_email", :unique => true
Expand Down

0 comments on commit 93cdac1

Please sign in to comment.