Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

uninitialized constant WillPaginate::LinkRenderer #10

Closed
zefir opened this issue Apr 6, 2011 · 4 comments
Closed

uninitialized constant WillPaginate::LinkRenderer #10

zefir opened this issue Apr 6, 2011 · 4 comments

Comments

@zefir
Copy link

zefir commented Apr 6, 2011

I have this issue on pasenger.
To fix it in app/helpers/remote_link_renderer.rb there should be change from:
class RemoteLinkRenderer < WillPaginate::LinkRenderer
to
class RemoteLinkRenderer < WillPaginate::ViewHelpers::LinkRenderer

@sandipransing
Copy link
Owner

Which version of will_paginate are you using ?? I suspect they broke down things in latest version.

@zefir
Copy link
Author

zefir commented Apr 6, 2011

gem "will_paginate", "~> 3.0.pre2"
I think this is only working with Rails 3.

@sandipransing
Copy link
Owner

If you are using gem "will_paginate", "~> 3.0.pre2" then you need to modify line to
class RemoteLinkRenderer < WillPaginate::ViewHelpers::LinkRenderer.
You can fork repo & send me pull request

@jcsrb
Copy link

jcsrb commented Jun 24, 2011

here is my remote link rendere for will paginate 3.0pre2, link_to_remote doesn't work in rails3 and the UJS version with :remote=> true can't work because its not a view but a simple html file in the iframe. hope this helps

class RemoteLinkRenderer < WillPaginate::ViewHelpers::LinkRenderer

  def link(text, target, attributes = {})
    if target.is_a? Fixnum
      attributes[:rel] = rel_value(target)
      target = url(target)
    end
    attributes[:onclick] = 'jQuery.ajax({type: "GET", url: "'+target+'", dataType: "script"});'
    attributes[:href] = 'javascript:void(0)'
    tag(:a, text, attributes)
  end
 end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants