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/

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs