songkick/oauth2-provider

View on GitHub
lib/songkick/oauth2/model/helpers.rb

Summary

Maintainability
A
0 mins
Test Coverage
module Songkick
  module OAuth2
    module Model

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