M
Marcin Jurczuk
Hello
I'm using login_generator as authentication mechanism.
I'm trying to make some logging system with sql as backend, and
I need have access to @session object within models.
Example code which won't work (It dosn't make anything) :
before_create { | record | a = @session[:user].id }
I'm getting error like this:
You have a nil object when you didn't expect it!
You might have expected an instance of Array.
The error occured while evaluating nil.[]
#{RAILS_ROOT}/app/models/subscriber.rb:14
This line is line above
Any suggestions or there is some sql base logging method for
rails ??
I'm using login_generator as authentication mechanism.
I'm trying to make some logging system with sql as backend, and
I need have access to @session object within models.
Example code which won't work (It dosn't make anything) :
before_create { | record | a = @session[:user].id }
I'm getting error like this:
You have a nil object when you didn't expect it!
You might have expected an instance of Array.
The error occured while evaluating nil.[]
#{RAILS_ROOT}/app/models/subscriber.rb:14
This line is line above
Any suggestions or there is some sql base logging method for
rails ??