-
-
Save abarrak/5043fec6cd8b9d7adb2984725a741db5 to your computer and use it in GitHub Desktop.
Rails: Convert array into ActiveRecord Relation object
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
scope :with_scope, -> { where(id: ARRAY_COLLECTION.map(&:id)) } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment