I followed the acl9 Readme exactly, have double checked everything and still get the following error when trying to use has_role!(:admin)
.
ActiveRecord::StatementInvalid: SQLite3::ConstraintException: roles_users.created_at may not be NULL: INSERT INTO "roles_users" ("user_id", "role_id") VALUES (1, 1)
The only catch is that I am using Rails 3.2 and used the following fix for an error: Rails 3.2 undefined method `key?' for nil:NilClass
Any suggestions?
This is a known issue in rails. Hopefully it will be resolved and reported on here.
I fixed it by eliminated the
has_and_belongs_to_many
lines from the corresponding model class, and for some reason that made it go away.