This has changed slightly in rails 4 and above :distinct => true
is now deprecated. Use:
Record.distinct.count('date')
Or if you want the date and the number:
Record.group(:date).distinct.count(:date)
This has changed slightly in rails 4 and above :distinct => true
is now deprecated. Use:
Record.distinct.count('date')
Or if you want the date and the number:
Record.group(:date).distinct.count(:date)