Module: ActiveRecord::Tenanted::Patches::Attributes
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/active_record/tenanted/patches.rb
Class Method Summary collapse
- .apply_patch ⇒ Object
-
.needs_patch? ⇒ Boolean
This monkey patch isn’t necessary after 8.1 removed the need for a connection.
Class Method Details
.apply_patch ⇒ Object
53 54 55 |
# File 'lib/active_record/tenanted/patches.rb', line 53 def apply_patch ActiveRecord::Base.prepend(self) if needs_patch? end |
.needs_patch? ⇒ Boolean
This monkey patch isn’t necessary after 8.1 removed the need for a connection. For details see github.com/rails/rails/pull/54348
49 50 51 |
# File 'lib/active_record/tenanted/patches.rb', line 49 def needs_patch? Gem::Requirement.new("~> 8.1.0").satisfied_by?(Gem::Version.new(Rails::VERSION::STRING)) end |