@account = Account.paginate(:all, :page => params[:page],:order=>'name', :per_page => 10, :joins=>"as a inner join coaches as c on a.id=c.account_id", :select => "a.id, a.name, c.id")
Try this query. Its using will_paginate only. In select option you can put whatever fields you want in those 2 tables. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

