sorcery with mongoid throwing transaction undefined

85 views Asked by At

On following line from controller

@user = create_from(provider)

Getting exception

#<NoMethodError: undefined method `transaction' for User:Class>

Here is the first line of exception backtrace

"/Users/Gull/.rvm/gems/ruby-2.1.0-preview2/gems/sorcery-0.8.4/lib/sorcery/controller/submodules/external.rb:173:in `create_from'"

This make sense that transaction are not supported by mongo, but is the configuration part that is invoking the transaction part of sorcery ?

1

There are 1 answers

0
Gul On

adding following line in the model file ... make it working

  include Sorcery::Model::Adapters::Mongoid