Forum: Ruby on Rails pagination on modal window

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
dare r. (Guest)
on 2009-01-31 07:40
Dear all,

I have implemented a modal window for selection of user. How i can
implement pagination for modal window. I have used the following
controller method for displaying user in modal window

def user_search

    @user_list = UserInfo.find( :all,:page => {:current =>
                             :size => 10 }, :conditions => ['id != ?',

    render :update do |page| "userlist"

      page.replace_html "userlist", :partial =>'user_list', :locals =>
{:userlist => @user_list}

      page << "showModal('contatiner_sub','userlist')"



<div id='modal-contact'>

      <% userlist.each do |user_list| %>


        <%= observe_field("user_name_1_#{}",
        :on => "changed",
        :url => {:action => :update_user, :id =>},
        :with => "'user_name='+value")

      <% end %>

    <div id='pagination'>
         <%= render :partial => '/application/pagination',
              :locals =>
                { :collection =>  userlist,
                  :action => 'user_search',
                  :id => nil
                  }  -%>


Please suggest on above code for implementing pagination in modal
window. Pagination works fine in all my normal lists but in modal window
it does,nt work. Please suggest.

Thanks in advance

Jose Martin
This topic is locked and can not be replied to.