Displaying 1 result from an estimated 1 matches for "messages_workgroups".
2006 May 15
0
Pagination with habtm
...s via has_and_belongs_to_many. I
would like to be able to display to my users a distinct list of messages
for the workgroup(s) that they are part of in paginated form. The SQL
for this query would be something like the following:
select distinct (m.id), m.title, m.created_at from messages m,
messages_workgroups mw, workgroups w where m.id = mw.message_id and w.id
= mw.workgroup_id and w.id in (1,2,3)
How can I do something like this using the pagination functionality? I
feel as if I might be missing something simple here.
Thanks.
--
Posted via http://www.ruby-forum.com/.