Why is belongs_to :through not an option with Rails? I'm sure there
is something I'm missing! I find myself wanting it more now with lazy
loading in Rails 3.
SELECT `tasks`.* FROM `tasks` INNER JOIN `projects` ON `tasks`.`id` IS
NULL INNER JOIN `clients` ON `clients`.`id` = `projects`.`client_id`
WHERE (`clients`.`name` = 'test')
I realize I can do Task.joins(:project => :client), but that is what I
am trying to avoid for my complicated scopes.
belongs_to :through definitely is not necessary just like
has_many :through is not necessary and wasn't even included in earlier
releases of Rails. With Rails 3, creating scopes that are lazily
loaded provides a lot of functionality that would be nice to extend to
the belongs_to :through relationship.