Access object within filter #17

Closed
baldwindavid opened this Issue Jul 21, 2011 · 6 comments

Projects

None yet

5 participants

@baldwindavid

Is there any way to get at the object that this is being called on from within a filter? I would like to make a filter for Liquid templating, but need to pass the object itself into the render rather than just text.

AutoHtml.add_filter(:liquid).with({}) do |text, options|
  Liquid::Template.parse(text).render(options)
end
@baldwindavid

It is probably better stated that I would like to get at the object within a filter while also using the auto_html_for method. I can get at the object via the #auto_html method, so it is not really a big deal.

@dapi
dapi commented Nov 8, 2011

Good idea

@dapi
dapi commented Nov 11, 2011

Access object within filter - dapi@e0c5d87

@yura
yura commented Nov 19, 2014

+1

@selivandex

+1

@dejan
Owner
dejan commented Dec 19, 2015

Closing as obsolete.

@dejan dejan closed this Dec 19, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment