I have a class Restaurant
:
Restaurant(id: integer, name: string, url: string, address: string
I would like to get all the different combinations of url
and name
and count them. How can I do that?
I've tried
Restaurant.select(:url, :name).distinct.count
but I get:
No function matches the given name and argument types. You might need to add explicit type casts.