Module: Songkick::OAuth2::Model::Helpers

Defined in:
lib/songkick/oauth2/model/helpers.rb

Class Method Summary collapse

Class Method Details

.count(model, conditions = {}) ⇒ Object



6
7
8
9
10
11
12
# File 'lib/songkick/oauth2/model/helpers.rb', line 6

def self.count(model, conditions={})
  if model.respond_to?(:where)
    model.where(conditions).count
  else
    model.count(:conditions => conditions)
  end
end