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.
Updated by Daniel Lobato Garcia about 9 years ago
- Related to Bug #3517: Help text for 'domain create' does not line up correctly added
Updated by Daniel Lobato Garcia about 9 years ago
- Related to Tracker #3157: Rails 4.1 upgrade tasks added
Updated by Daniel Lobato Garcia about 9 years ago
- Related to deleted (Bug #3517: Help text for 'domain create' does not line up correctly)
Updated by The Foreman Bot about 9 years ago
- Status changed from New to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/2768 added
- Pull request deleted (
)
Updated by Dominic Cleal about 9 years ago
- Translation missing: en.field_release set to 71
Updated by Daniel Lobato Garcia about 9 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset 7fdb705b9698f773ddd15cd6d32b9a41b7e022d1.
Actions