-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Methods dissapear #3
Comments
"If I change anything in my code however" is to vague for me to have an idea of what it could be. |
Sorry for being vague. What I meant was that if I change anything in my rails code. i.e in my models. Or add permits to cantango for example. I have troles set up with a string_many association. And trying to use the method in my controller / console, that's pretty much it. Anyway, here's the trace
The method worked and returned true, then I changed a permit from can to cannot. If I restart the console the method will be defined. |
I recommend that you try one of the other roles solutions compatible with cantango. Try simple_roles or roles_active_record instead for now. I need some more work on troles to make sure plays nice. In rails console, did you try to use the |
I did use Thanks! |
For now, please try out: https://github.com/stanislaw/simple_roles Also try out the latest patch release of CanTango (v. 0.9.4.5) |
I'm having trouble locating this error. Example:
In rails console.
User.last.has_role?
Works.
If I change anything in my code however
User.last.has_role?
NoMethodError: undefined method `has_role?' for #User:0x007fcd17d508b8
And I need to restart the console/server
Any Ideas on where to look? I figure it has something to do with the caching?
The text was updated successfully, but these errors were encountered: