Actions
Bug #12011
closedReplace .includes(table).where(table) by .eager_load
Description
On Rails 3, .includes(:users).where("users.name = 'daniel'") works because Rails would be smart enough to figure out the where query uses the includes table.
In this case it'd internally resolve it to eager_load to use the table users in the query. However on Rails 4 they decided they didn't want to maintain a parser for
SQL, so you have to append .references(:table) after all .includes(:table).where("SQL that uses table"). This is not retrocompatible, but we can directly use
eager_load on Rails 3 and 4 to avoid using .references.
Actions