I added the following to my base_helper.rb to get remote rendering to
work when using paginating_find. Thought someone out there might find
this useful, works pretty slick for me when I have a google map that
is ruined when pages re-render.
-----------------------------------------------------------------------------------------------------------------------------
def paginating_links_remote(update, paginator, options = {},
html_options = {})
if paginator.page_count > 1
name = options[:name] ||
PaginatingFind::Helpers::DEFAULT_OPTIONS
[:name]
our_params = (options[:params] || params).clone
our_params.delete("authenticity_token")
our_params.delete("commit")
links = paginating_links_each(paginator, options) do |n|
our_params[name] = n
link_to_remote(n, :update => update, :url => our_params,
html_options => html_options.merge(:class => (paginator.page.eql?(n) ?
'active' : '')))
end
end
content_tag(:div, pagination_info_for(paginator), :class =>
'pagination_info') + (links || '')
end
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CommunityEngine" 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/communityengine?hl=en
-~----------~----~----~----~------~----~------~--~---