2010/1/21 John Merlino <[email protected]>: > Hey all, > > I'm getting a nomethoderror: > The error occurred while evaluating nil.staff_admin? > > It occurs while I'm trying to create role-based permissions for specific > actions, such as edit. So a staff admin may not be able to edit. Now I > understand that it's trying to say that staff admin is undefined, but I > believe I did define it in code below. Thanks for all suggestions.
It is not exactly undefined, but has the value nil. Have a look at the Rails Guide on debugging then, using ruby-debug, break into the code at the appropriate point and inspect the variables to find out what is going on. That will generally be much quicker than waiting for someone to analyse your code to work out what is wrong. Good luck Colin
-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

