Can we access ActionView context within paginator.render? #239

Closed
damien-roche opened this Issue May 29, 2012 · 3 comments

Comments

Projects
None yet
3 participants

I was trying to do something like this:

= paginator.render do
  %nav.pagination
    = link_to "example", example_path

Is there a way to access ActionView helpers from within render?

Actually, a better method would be to use partials similar to what the generator creates:

= paginator.render do
  %nav.pagination
    perpage_tag
/# kaminari/_per_page
= link_to etc..

But I'm unsure as to how to use these tags? I tried to use 'render' but that didn't work inside paginator.render block.

Appreciate any insight.

Member

zzak commented Nov 5, 2013

@damien-roche That is how the current parials work, can you explain more what you're trying to do?

Owner

yuki24 commented Dec 4, 2013

@damien-roche Thank you for reporting! And you are right, you can't use helper methods in render block. This is not what we expect, and we should be able to use helper methods within the block.

yuki24 closed this in defc7ba Mar 16, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment