-
Notifications
You must be signed in to change notification settings - Fork 402
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
undefined method 'define_dynamic_method' during rake db:migrate #455
Comments
Update - Actually it does crash in the Rails console if I run: User.all.each do |user|
if user.admin?
user.add_role :admin
end
end |
Ah, I think there's a bug in Rolify. I added a
|
Argh, I figured out why my I'm using the acts_as_token_authentication_handler_for User And my
I added an underscore to move the |
Have you added Also, to not load all the users, it is better to do it like this:
|
I wanted to create a migration to move my
admin
boolean flags into Roles. My migration looks like this:When I run
rake db:migrate
, I get the following error:Any idea why this might be happening?
(FYI, it works fine if I run
user.add_role :admin
in the Rails console.)NOTE: In my logs you can see that I was testing on Rails
5.0.2
. I just updated to Rails5.1.2
and am seeing the same error.The text was updated successfully, but these errors were encountered: