search for: template_extensions

Displaying 2 results from an estimated 2 matches for "template_extensions".

Did you mean: template_extension
2005 Dec 19
1
Preserving fallback with RJS
Hi guys, I really like RJS. I think they''ll replace partials in alot of instances. Unfortunately, because they''re automatically used like .rhtml and .rxml and are hard to specifically specify it makes it messy to preserve fallbacks when using them. For instance, using partials instead of rjs, my create method might look like: def create post = Post.new(params[:post]) ...
2012 Sep 14
1
calling method on base intended to simulate initialize on instances?
...base) base.register_default_template_handler :erb, ERB.new base.register_template_handler :builder, Builder.new base.register_template_handler :raw, Raw.new end @@template_handlers = {} @@default_template_handlers = nil def self.extensions @@template_extensions ||= @@template_handlers.keys end def register_default_template_handler(extension, klass) register_template_handler(extension, klass) @@default_template_handlers = klass end def register_template_handler(extension, handler) @@template_handlers[extensi...