i am use will_paginate using ajax my code is following

in controller
         def index

    #...@images = Image.all
  @images = Image.paginate :page => params[:page], :per_page => 2
    respond_to do |format|
      #format.html # index.html.erb
      #format.xml  { render :xml => @images }
    format.js{
        render :update do |page|
      page.replace_html 'mcont', :partial => 'search'
      end
    }
    end
  end

in _searhc file
        <div>
  <% @images.each do |i| %>
    <%=h i.name%>
  <%end%>
  <%= will_paginate @images %>
</div>
i want replace in index file
         <div id="mcont">
         </div>

but i got error try {
jQuery}
-- 
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to