Module: Goldiloader::Compatibility
- Defined in:
- lib/goldiloader/compatibility.rb
Class Method Summary collapse
- .pre_rails_7? ⇒ Boolean
- .pre_rails_7_2? ⇒ Boolean
- .rails_6_1? ⇒ Boolean
- .rails_6_1_or_greater? ⇒ Boolean
Class Method Details
.pre_rails_7? ⇒ Boolean
5 6 7 |
# File 'lib/goldiloader/compatibility.rb', line 5 def self.pre_rails_7? ::ActiveRecord::VERSION::MAJOR < 7 end |
.pre_rails_7_2? ⇒ Boolean
17 18 19 20 |
# File 'lib/goldiloader/compatibility.rb', line 17 def self.pre_rails_7_2? ::ActiveRecord::VERSION::MAJOR < 7 || (::ActiveRecord::VERSION::MAJOR == 7 && ::ActiveRecord::VERSION::MINOR < 2) end |
.rails_6_1? ⇒ Boolean
9 10 11 |
# File 'lib/goldiloader/compatibility.rb', line 9 def self.rails_6_1? ::ActiveRecord::VERSION::MAJOR == 6 && ::ActiveRecord::VERSION::MINOR == 1 end |
.rails_6_1_or_greater? ⇒ Boolean
13 14 15 |
# File 'lib/goldiloader/compatibility.rb', line 13 def self.rails_6_1_or_greater? ::ActiveRecord::VERSION::MAJOR > 6 || rails_6_1? end |