I am stumped and would appreciate some help.
Using devise 4.2.1 and rails 5.0. Successfully set up devise model and create a resource. Yet, when I attempt to query the admin table in rails console, I get this error:
2.4.0 :003 > User.all
User Load (0.5ms) SELECT "users".* FROM "users"
=> #<ActiveRecord::Relation []>
2.4.0 :004 > Admin.all
Admin Load (1.4ms) SELECT "admins".* FROM "admins"
ArgumentError: wrong number of arguments (given 0, expected 1)
from /Users/nonni/.rvm/gems/ruby-2.4.0@spree/gems/devise-4.2.1/lib/devise/models/database_authenticatable.rb:157:in `password_digest'
from /Users/nonni/.rvm/gems/ruby-2.4.0@spree/gems/activemodel-5.0.2/lib/active_model/serialization.rb:135:in `block in serializable_hash'
from /Users/nonni/.rvm/gems/ruby-2.4.0@spree/gems/activemodel-5.0.2/lib/active_model/serialization.rb:135:in `each'
from /Users/nonni/.rvm/gems/ruby-2.4.0@spree/gems/activemodel-
from /Users/nonni/.rvm/gems/ruby-2.4.0@spree/gems/railties-5.0.2/lib/rails/commands.rb:18:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
This line in particular seems to be where the error occurs:
4.2.1/lib/devise/models/database_authenticatable.rb:157:in `password_digest' from /Users/nonni/.rvm/gems/ruby 2.4.0@spree/gems/activemodel-
When I inspect postico, I see the newly created record:
2 rand@user.com $2a$11$X9IcCMq9rSIz/QzTmoXfi.Se1nximWq8rRjAClpqJHgbPArJbqGAW1 2017-04-18 2017-04-18 (removed other_time_steps)
There isn't a password_digest column on Admins table (devise generates an encryted_password column as long as it receives password as a named argument).
I also get this same error when I attempt to create a new admin in console. What could I possibly be missing? Would appreciate any pointers. Thanks!