Jose Hales-Garcia
2006-Aug-16 17:48 UTC
[Rails] Filtering pagination results on a foreign table criteria
I have a one-to-many relation between my documents and statuses tables. I want to display only the documents whose states are not "Published". I haven''t figured out how to do this using the standard paginate method (maybe there''s a way using its :joins option). I''m also considering writing a custom paginator or using paginate_by_sql[1]. Does anyone have techniques they''ve used to do this? Jose [1] http://thebogles.com/blog/2006/06/paginate_by_sql-for-rails-a-more-general-approach/ -- Posted via http://www.ruby-forum.com/.