Ruby on Rails Friday, July 31, 2015

Actually, you can probably stuff the condition into the "joins" of the AREL. But there is NO POINT. You have a working solution to using a very non-standard join, trying to split it up into pieces in order to force it into AREL accomplishes nothing. So like I said previously, fix the schema, or stick with find_by_sql.

And if you think the schema is fine, step back a second and look at how much confusion it is causing you right now... You were unable to look at the SQL of two different queries and determine why they returned different results, precisely because of the convolute join...

--
Scott Ribe
scott_ribe@elevated-dev.com
http://www.elevated-dev.com/
https://www.linkedin.com/in/scottribe/
(303) 722-0567 voice





--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/7CBE8F88-6184-4A81-B5D4-28F51BD649D6%40elevated-dev.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment