Rails Model Load Hook
Adds :model_class loading hook for every ActiveRecord descendant.
Usage
ActiveSupport.on_load :model_class do
# The code for your model class goes hereā¦
endInstallation
Add this line to your application's Gemfile:
gem "rails_model_load_hook"And then execute:
$ bundleOr install it yourself as:
$ gem install rails_model_load_hookContributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create new Pull Request
License
The gem is available as open source under the terms of the MIT License.