I am using groupdate
gem for grouping the records with date/time. I want to group the records and select the users with having clause and then group the records with date/month/time. But its not giving proper result which i want.
eg:
User.group_by_month(:created_at).count # gives proper result but
User.joins("LEFT JOIN devices ON devices.user_id=users.id").group("users.id").having("COUNT(devices.id)=0").count #gives all users in hash while i want only count for the months.
I am using this for showing charts using chartkick
gem.
Any help will be appreciated.