Module: RockOAuth::Model::Helpers
- Defined in:
- lib/rockoauth/model/helpers.rb
Class Method Summary collapse
Class Method Details
.count(model, conditions = {}) ⇒ Object
5 6 7 8 9 10 11 |
# File 'lib/rockoauth/model/helpers.rb', line 5 def self.count(model, conditions={}) if model.respond_to?(:where) model.where(conditions).count else model.count(:conditions => conditions) end end |