mercredi 18 mars 2015

Covert an array to an active record relation in ruby

I have the following where clause...



User.where(location_id: params[:user_place_id]).map(&:open_session)


I would like to convert this to an Active Record relation so I can call order and pagination on it.


Looks like I want to .arr, but I'm not sure how to call that in this case.


Aucun commentaire:

Enregistrer un commentaire