Monkey Patching ActiveRecord Models
While working on a Rails application I had a need to override a method on an ActiveRecord
model, but only in the development
environment. I could conditionally include my monkey patched module in the class definition, like so: