nbudin / devise_openid_authenticatable

OpenID authentication for Devise
MIT License
99 stars 32 forks source link

undefined method `apply_schema' for User:Class (NoMethodError) #4

Closed fbjork closed 14 years ago

fbjork commented 14 years ago

Getting the following error when using devise with mongoid:

/Users/fredrik/.rvm/gems/ree-1.8.7-2010.02/gems/devise_openid_authenticatable-1.0.0.alpha2/lib/devise_openid_authenticatable/schema.rb:3:in openid_authenticatable': undefined methodapply_schema' for User:Class (NoMethodError) from /Users/fredrik/.rvm/gems/ree-1.8.7-2010.02/gems/devise-1.1.0/lib/devise/orm/mongoid.rb:9:in send' from /Users/fredrik/.rvm/gems/ree-1.8.7-2010.02/gems/devise-1.1.0/lib/devise/orm/mongoid.rb:9:indevise_modules_hook!' from /Users/fredrik/.rvm/gems/ree-1.8.7-2010.02/gems/devise-1.1.0/lib/devise/orm/mongoid.rb:9:in each' from /Users/fredrik/.rvm/gems/ree-1.8.7-2010.02/gems/devise-1.1.0/lib/devise/orm/mongoid.rb:9:indevise_modules_hook!' from /Users/fredrik/.rvm/gems/ree-1.8.7-2010.02/gems/devise-1.1.0/lib/devise/models.rb:66:in `devise'

Seems to be the same with activerecord: http://stackoverflow.com/questions/3186536/devise-with-openid-in-rails3-beta4-but-raise-undefined-method-apply-schema-er

nbudin commented 14 years ago

Sorry about that! This was caused by an API change in Devise 1.1.0 stable. I've added code to check for which API to use and choose appropriately. The fix is released in 1.0.0.alpha3.

fbjork commented 14 years ago

Thanks for fixing it so fast! Works like a charm now.

fbjork commented 14 years ago

Any ETA on the SReg additions?

nbudin commented 14 years ago

Funny you should ask, I was just working on those this morning. Expect something later today...