Module: Searchgasm::ActiveRecord::Associations::HasManyAssociation

Defined in:
lib/searchgasm/active_record/associations.rb

Instance Method Summary collapse

Instance Method Details

#count_with_searchgasm(*args) ⇒ Object

This is an alias method chain. It hook into ActiveRecord’s “calculate” method for has many associations and checks to see if Searchgasm should get involved.



46
47
48
49
# File 'lib/searchgasm/active_record/associations.rb', line 46

def count_with_searchgasm(*args)
  column_name, options = @reflection.klass.send(:construct_count_options_from_args, *args)
  count_without_searchgasm(column_name, sanitize_options_with_searchgasm(options))
end