Skip to content

Commit

Permalink
Follow recommended way to extend Railties
Browse files Browse the repository at this point in the history
  • Loading branch information
brunosedler committed Oct 23, 2024
1 parent 8258f2c commit 6466f94
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html

### Compatible changes

* Follow recommended way to extend Railties


## 1.2.0 - 2023-03-15

Expand Down
6 changes: 3 additions & 3 deletions lib/has_defaults/active_record_ext.rb
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,6 @@ def evaluate_raw_default_value(raw_value)
end
end

ActiveRecord::Base.extend(HasDefaults::ActiveRecordExt::ClassMethods)


ActiveSupport.on_load(:active_record) do
extend(HasDefaults::ActiveRecordExt::ClassMethods)
end

0 comments on commit 6466f94

Please sign in to comment.