A few things have already changed.
* TemplateHandler#cache_fragment has been remove. Ensure your template
handler sets a @output_buffer if you want the cache helper to work.
aca246a
* I had to change the method signature for TemplateHandler#render to
take a local_assigns argument since template.locals is no longer
available. 6ebdd0e
* TemplateHandler is initialized with view set to nil when it is
compiling. "ERBHandler.new(nil).compile(template)"
I'd really like deprecate the TemplateHandler#render all together. If
you think your handler can not be compiled, you always just compile in
a delegate call to your "noncompilable" handler. This leaves us with
only one method, compile.
The current state is pretty hacky to attempt to preserve some kind of
"compatibility". It be nice to scrap the current setup and try
something fresh that would fit in better.
A proposed API
Template.register_extension :erb, lambda { |template|
ERB.new(template.source).src }
Any other ideas? Also, what problems have you had to deal with the
previous implementation?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Core" 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/rubyonrails-core?hl=en
-~----------~----~----~----~------~----~------~--~---