Module: Believer::Counting::ClassMethods
- Defined in:
- lib/believer/counting.rb
Instance Method Summary collapse
-
#counter_columns ⇒ Object
Returns all the counter columns.
-
#is_counter_table? ⇒ Boolean
Is this a model class with counter columns?.
Instance Method Details
#counter_columns ⇒ Object
Returns all the counter columns
10 11 12 |
# File 'lib/believer/counting.rb', line 10 def counter_columns columns_with_type(:counter) end |
#is_counter_table? ⇒ Boolean
Is this a model class with counter columns?
15 16 17 |
# File 'lib/believer/counting.rb', line 15 def is_counter_table? counter_columns.any? end |