Module: Thredded::Compat
- Defined in:
- lib/thredded/compat.rb
Class Method Summary collapse
- .rails_gte_61? ⇒ Boolean private
Instance Method Summary collapse
Class Method Details
.rails_gte_61? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
7 8 9 10 |
# File 'lib/thredded/compat.rb', line 7 def rails_gte_61? @rails_gte_61 = (Rails.gem_version >= Gem::Version.new('6.1.0')) if @rails_gte_61.nil? @rails_gte_61 end |
Instance Method Details
#association_preloader(records:, associations:, scope:) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
14 15 16 17 18 |
# File 'lib/thredded/compat.rb', line 14 def association_preloader(records:, associations:, scope:) ActiveRecord::Associations::Preloader.new( records: records, associations: associations, scope: scope ).call end |