#2 new
Pat Roy

Compatible with Rails 2.1

Reported by Pat Roy | June 8th, 2008 @ 10:33 PM

When do you see this compatible with Rails 2.1?

Trying to get Mephisto Edge running and getting this :

undefined method `register_template_handler' for ActionView::Base:Class

vendor/plugins/liquid/init.rb:4

register_template_handler isn't in Rails 2.1 anymore.

Comments and changes to this ticket

  • goodwill

    goodwill July 26th, 2008 @ 05:19 AM

    • → Tag cleared.

    There are quite a few compatibility issues involved. compilable? is just one of them. The new render method does not have a local_assigns to deal with as well, I have did a quick work around by changing the method signature and remark the local assign merge statement inside extra/liquidview.rb. I never written a viewtemplate engine with rails before, so my hack could be completely broken due to my lack of knowledge to rails template.

  • Michael Klett

    Michael Klett September 22nd, 2008 @ 09:56 AM

    I am attaching a patch which enables rails 2.1.x compatibility by allowing the render method to accept an ActionView::Template object.

    This seems to complete the earlier "ugly hack" for liquid-view in rails 2.1.x.

    I think a more complete solution that de-couples the parsing from the rendering (Rails's compile vs. render phase) is still a good idea, but this gets LiquidView templates going again for those who need them.

    I've tested this lightly in both Rails 2.1.1 and Rails 2.0.2. The change is also available in github: http://github.com/moklett/liquid...

Please Login or create a free account to add a new comment.

You can update this ticket by sending an email to from your email client. (help)

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Safe template language

People watching this ticket