I am porting a Rails app to Rails 4.2. This Rails app contains some rather complex manual SQL code in associations - partly due to DB optimizations (e ...
I am porting a Rails app to Rails 4.2. This Rails app contains some rather complex manual SQL code in associations - partly due to DB optimizations (e ...
I was under the impression that the custom_finder option in ActiveRecord meant that you got association extensions like .where and .order for free, fo ...
We're building an application that creates group pages similar to Facebook's group pages. Someone can post to a page and that post can have replies. S ...
I have the problem that the query I use for finder_sql is not parsed correctly before it is handed over to PostgreSQL resulting in a database syntax e ...
I have boxes and balls. Balls are in boxes. Ball can be either red and green. I want to set has_many only with green balls. I know that finder_sql ...
I need to execute this query to find out the next auto_increment value that will be used by MySQL for a particular table. How to invoke this parti ...
In my application, a user has_many tickets. Unfortunately, the tickets table does not have a user_id: it has a user_login (it is a legacy database). I ...