Skip to content
This repository has been archived by the owner on Jun 16, 2020. It is now read-only.

User seems to need a new attribute #78

Open
alexanderisora opened this issue Jul 25, 2017 · 0 comments
Open

User seems to need a new attribute #78

alexanderisora opened this issue Jul 25, 2017 · 0 comments

Comments

@alexanderisora
Copy link

Hello. Thank a lot for such a precious gem!
Do I need to perform some migration to start adding roles?

rails -v
>Rails 5.0.4
2.3.3 :001 > User.first.roles
WARNING: `roles' is not an attribute of `Class'. But, it's ok if it happens during migrations and your "bitmasked" attribute is still not created.
2.3.3 :003 > User.first.roles << :admin
  User Load (1.5ms)  SELECT  "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ?  [["LIMIT", 1]]
ActiveModel::MissingAttributeError: can't write unknown attribute `roles`
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant