Guest User

Untitled

a guest
Aug 11th, 2018
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. Manual for new version devise 1.5 and omniauth 1.0.0 facebook with Mongoid
  2. Could not find a valid mapping for #<Mongoid::Criteria
  3. selector: {:email=>"emailusercomebackfacebook"},
  4. options: {},
  5. class: User,
  6. embedded: false>
  7.  
  8. if user = (User.where(email:(data.email)).map.first)
  9.  
  10. Mongoid::Errors::Validations in
  11.  
  12. Users::OmniauthCallbacksController#facebook
  13.  
  14. Validation failed - Password can't be blank, Name can't be blank.
  15.  
  16. Rails.root: /home/ubuntu/Desktop/app
  17. Application Trace | Framework Trace | Full Trace
  18. app/models/user.rb:21:in 'find_for_facebook_oauth'
  19. app/controllers/users/omniauth_callbacks_controller.rb:4:in 'facebook'
  20.  
  21. else # Create a user with a stub password.
  22. User.create!(:email => data.email, :encrypted_password => Devise.friendly_token[0,20])
Add Comment
Please, Sign In to add comment