search for: canpay

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

Did you mean: canplay
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 breakpoin...