search for: consumer_id

Displaying 1 result from an estimated 1 matches for "consumer_id".

2007 Mar 25
3
Session is nil inside model
I''m tring to write a little function to indicate if a user is able to pay an invoice, I have my invoice model with: def canPay? if session[:user].id == self.consumer_id return true; else return false; end end as a method, but it gives the error: "undefined local variable or method `session'' for #<Invoice: 0xb7670928>" Right before the method is called, I put a breakpoint, and session is not nil, it has the user obj...