Skip to content

Commit

Permalink
Merge pull request #17 from makandra/dominicbeger/d-282-minidusen-act…
Browse files Browse the repository at this point in the history
…iverecord-extend-modernisierien

Use ActiveSupport.on_load for extending ActiveRecord
  • Loading branch information
begerdom authored Aug 22, 2024
2 parents 8f48fa2 + 112cc9a commit 1488148
Show file tree
Hide file tree
Showing 13 changed files with 20 additions and 12 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html

### Compatible changes

## 0.11.1 2024-08-22

### Compatible changes

- Fix: Use ActiveSupport.on_load for extending ActiveRecord

## 0.11.0 2024-03-18

### Breaking changes
Expand Down
2 changes: 1 addition & 1 deletion Gemfile.4.2.mysql2.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
minidusen (0.11.0)
minidusen (0.11.1)
activerecord (>= 3.2)
activesupport (>= 3.2)
edge_rider (>= 0.2.5)
Expand Down
2 changes: 1 addition & 1 deletion Gemfile.4.2.pg.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
minidusen (0.11.0)
minidusen (0.11.1)
activerecord (>= 3.2)
activesupport (>= 3.2)
edge_rider (>= 0.2.5)
Expand Down
2 changes: 1 addition & 1 deletion Gemfile.5.2.mysql2.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
minidusen (0.11.0)
minidusen (0.11.1)
activerecord (>= 3.2)
activesupport (>= 3.2)
edge_rider (>= 0.2.5)
Expand Down
2 changes: 1 addition & 1 deletion Gemfile.5.2.pg.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
minidusen (0.11.0)
minidusen (0.11.1)
activerecord (>= 3.2)
activesupport (>= 3.2)
edge_rider (>= 0.2.5)
Expand Down
2 changes: 1 addition & 1 deletion Gemfile.6.0.mysql2.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
minidusen (0.11.0)
minidusen (0.11.1)
activerecord (>= 3.2)
activesupport (>= 3.2)
edge_rider (>= 0.2.5)
Expand Down
2 changes: 1 addition & 1 deletion Gemfile.6.0.pg.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
minidusen (0.11.0)
minidusen (0.11.1)
activerecord (>= 3.2)
activesupport (>= 3.2)
edge_rider (>= 0.2.5)
Expand Down
2 changes: 1 addition & 1 deletion Gemfile.6.1.mysql2.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
minidusen (0.11.0)
minidusen (0.11.1)
activerecord (>= 3.2)
activesupport (>= 3.2)
edge_rider (>= 0.2.5)
Expand Down
2 changes: 1 addition & 1 deletion Gemfile.6.1.pg.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
minidusen (0.11.0)
minidusen (0.11.1)
activerecord (>= 3.2)
activesupport (>= 3.2)
edge_rider (>= 0.2.5)
Expand Down
2 changes: 1 addition & 1 deletion Gemfile.7.0.mysql2.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
minidusen (0.11.0)
minidusen (0.11.1)
activerecord (>= 3.2)
activesupport (>= 3.2)
edge_rider (>= 0.2.5)
Expand Down
2 changes: 1 addition & 1 deletion Gemfile.7.0.pg.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
minidusen (0.11.0)
minidusen (0.11.1)
activerecord (>= 3.2)
activesupport (>= 3.2)
edge_rider (>= 0.2.5)
Expand Down
4 changes: 3 additions & 1 deletion lib/minidusen/active_record_ext.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,6 @@ def where_like(conditions, options = {})
end
end

ActiveRecord::Base.send(:extend, Minidusen::ActiveRecordExtensions::ClassMethods)
ActiveSupport.on_load(:active_record) do
ActiveRecord::Base.send(:extend, Minidusen::ActiveRecordExtensions::ClassMethods)
end
2 changes: 1 addition & 1 deletion lib/minidusen/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Minidusen
VERSION = '0.11.0'
VERSION = '0.11.1'
end

0 comments on commit 1488148

Please sign in to comment.