Replies: 1 comment
-
I do not know of a better way, nor can I think of a better way, than what you've done above. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have Car model which can have an attached Photo. Using ActiveRecord, I'd like to find just the Cars with a Photo attached. I've been checking for a null
photo_data
column, but I'm wondering if this is the best way, or if there's built-in method I should be using to do this. I can't seem to find one.Currently it looks like this:
And the scope:
Thanks for any tips!
Beta Was this translation helpful? Give feedback.
All reactions