Hi
   Add the following code to  view_helpers.rb .The file is in 
vendor/plugins/will_paginate/lib/will_paginate

   def page_link_or_span(page, span_class = 'current', text = nil)
    text ||= page.to_s
    if page and page != current_page
      if update = @options[:update]
        @template.link_to_remote text, :update => update, :url => 
url_options(page)
      else
        @template.link_to text, url_options(page)
      end
    else
     @template.content_tag :span, text, :class => span_class
   end

   Then for ajax pagination in view do like
<%= will_paginate @thecollectionyouwanttopaginate, :update=>'div', 
:params=>{:controller=>'controller_name',:action=>'action_name',:any_additional_parameters=>@any_additional_parameters},
 
:container => false %>

    And for normal pagination do what you are currenly doing

Sijo
-- 
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