Ajax asd will paginate

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


<% @images.each do |i| %>
<%=h i.name%>
<%end%>
<%= will_paginate @images %>
i want replace in index file

but i got error try {
jQuery}

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