Module: MakeTaggable::Taggable::Collection::CalculationMethods

Defined in:
lib/make_taggable/taggable/collection.rb

Overview

These relations carry a custom SELECT -- the tag columns plus an aliased count -- which Active Record would otherwise fold into the COUNT(). Count rows instead, whatever the relation selects.

Instance Method Summary collapse

Instance Method Details

#count(column_name = :all) ⇒ Integer

Counts rows rather than the relation's selected columns.

Parameters:

  • column_name (Symbol, String) (defaults to: :all)

    the column to count

Returns:

  • (Integer)


280
281
282
# File 'lib/make_taggable/taggable/collection.rb', line 280

def count(column_name = :all)
  super
end