Module: ActsAsSourceable::GroupScopeExtensions
- Defined in:
- lib/acts_as_sourceable/acts_as_sourceable.rb
Instance Method Summary collapse
-
#count ⇒ Object
Extension for scopes where we’re grouping but want to be able to call count.
Instance Method Details
#count ⇒ Object
Extension for scopes where we’re grouping but want to be able to call count
85 86 87 |
# File 'lib/acts_as_sourceable/acts_as_sourceable.rb', line 85 def count connection.select_value("SELECT count(1) FROM (#{to_sql}) AS count_all").to_i end |