sdsykes / slim_scrooge

SlimScrooge heavily optimises your database interactions
313 stars 25 forks source link

Error on login with sorcery. #24

Open lephyrius opened 12 years ago

lephyrius commented 12 years ago

I get this error when I try to login with sorcery when using this gem:

Completed 500 Internal Server Error in 30ms

ArgumentError (wrong number of arguments (2 for 1)): app/controllers/session_controller.rb:14:in `create'

Rendered .rvm/gems/ruby-1.9.3-p194/gems/actionpack-3.2.8/lib/action_dispatch/middleware/templates/rescues/_trace.erb (1.5ms) Rendered .rvm/gems/ruby-1.9.3-p194/gems/actionpack-3.2.8/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (1.2ms) Rendered .rvm/gems/ruby-1.9.3-p194/gems/actionpack-3.2.8/lib/action_dispatch/middleware/templates/rescues/diagnostics.erb within rescues/layout (24.1ms)

On the line in the app/controllers/session_controller.rb:14:in 'create' is this bit of code: 'user = login params[:username], params[:password], params[:remember_me]'

Is this gem not compatible with Rails 3.2.8 ?

sdsykes commented 12 years ago

It may not be fully compatible. I'm willing to accept patches, or grant committer rights to anyone who would wish to test with the latest rails versions.

rderoldan1 commented 11 years ago

I get the same error when I used dinamic finders, example

Sesion.find_by_token("token")
=> ArgumentError - wrong number of arguments (2 for 1)