Module: ActiveRecordDistinctOn

Defined in:
lib/active_record_distinct_on.rb,
lib/active_record_distinct_on/railtie.rb,
lib/active_record_distinct_on/version.rb,
lib/active_record_distinct_on/distinct_on_query_methods.rb

Defined Under Namespace

Modules: DistinctOnQueryMethods Classes: Railtie

Constant Summary collapse

VERSION =
'1.7.0'

Class Method Summary collapse

Class Method Details

.installObject



8
9
10
11
12
# File 'lib/active_record_distinct_on.rb', line 8

def self.install
  ActiveRecord::Relation.include DistinctOnQueryMethods
  ActiveRecord::Querying.delegate :distinct_on, to: :all
  ActiveRecord::Relation::Merger::NORMAL_VALUES << :distinct_on
end