Created
September 15, 2012 05:10
-
-
Save brandoncordell/3726415 to your computer and use it in GitHub Desktop.
Sorcery with Mongoid isn't persisting the username or email field
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class User | |
include Mongoid::Document | |
authenticates_with_sorcery! | |
attr_accessor :username, :email, :password, :password_confirmation | |
attr_accessible :username, :email, :password, :password_confirmation | |
field :_id, type: String, default: -> { username.to_s.parameterize } | |
field :username, type: String | |
field :email, type: String | |
field :crypted_password, type: String | |
field :salt, type: String | |
end | |
Parameters: { | |
"utf8"=>"✓", | |
"authenticity_token"=>"cHo4kDYQ9186rAbcnkje4oi7WXhcw8Sg4/WXwN1EWbs=", | |
"user"=>{ | |
"username"=>"asdfsdf", | |
"email"=>"[email protected]", | |
"password"=>"[FILTERED]", | |
"password_confirmation"=>"[FILTERED]" | |
}, | |
"commit"=>"Save" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment