I'm trying to count the fields in a table, and the returned SQL isn't generated properly.
What am I doing wrong?
ds
is the dataset:
term = 'abouts'
puts ds.count(:id).where(kind: term) # => app.rb:179:in `<main>': undefined method `where' for 115:Integer (NoMethodError)
I am thinking aggregate methods can have conditionals like WHERE
.
How can I fix this?