Forum: Ruby on Rails paginate :includes not working as I thought it should

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
43ec5998360a0cc21b51afef1781e9c0?d=identicon&s=25 Daniel Higginbotham (Guest)
on 2006-04-20 19:17
(Received via mailing list)
Hello everyone, I have the code below:

paginator_options.merge!({:conditions => 'cities.id = 4', :include =>
[:cities]})

@people_pages, @people = paginate :people, paginator_options


There's a many-to-many relationship between people and cities.

It seemed like before this was working, but now in the sql that's
generated
the join table isn't present so that the condition "cities.id = 4"
throws an
error. Any ideas?

Thanks,
Daniel
This topic is locked and can not be replied to.