Provides greatest_n_per_group method on active record relations