activerecord-firewall
activerecord-firewall copied to clipboard
Add a 'report only' feature where activerecord models will not blow up when firewalled but will just log
Currently, the gem will always blow up when a firewalled constraint is violated. This isn’t great for when you’re trying to implement this new safeguard in a production application.
This adds an option to firewalled_belongs_to called report_only that instead of raising the exception will print out the error message to the log at the INFO level.
I also added an “image” model & association to each user which uses the report only type of belongs to.
This is good for review now (no longer WIP)
I pulled the commit that had rubocop & style changes. I'll add this in a separate PR to keep the diff clear