I have some fields that set up a HABTM relationship (permissions for an
access control list for users) that need to pair user roles with
permissions, and I’d like to not have to set it up manually in the
database. Instead, I’d like to just say things like:
This way I can change the permission structure from ruby, rather than
having to go to the DB. Also, DB schemas (eg for migrations) aren’t
going to carry my carefully selected table contents with them.
I only want to run this once, when the application starts. So, where do
I put this code?