Overriding CircleCI settings to load data from seed and rake tasks.

CircleCI generates its own database.yml for every build. It then creates the database using the newly created database.yml file and loads the schema. It sets the environment to ‘test’ and runs the test cases. I needed some data that was loaded using seed and a rake task. This data was preserved from truncation between testContinue reading “Overriding CircleCI settings to load data from seed and rake tasks.”

Dynamic roles and permissions using cancan

Most of us already use cancan for authorization, where we define the Role Based Access (RBAC) to various models in the Ability class. However, any changes to these abilities, requires code changes to the Ability class and restarting the application for the changes to take effect. What if we could assign these permissions dynamically? ThatContinue reading “Dynamic roles and permissions using cancan”