This is a technical question I ran into while reading through the Merb- core code base:
Refering to the file merb-core/controller/mixins/render.rb: line 414 The signature for _template_for has 5 parameters, and the API is marked as private so it should only be called by other Merb function. It appears that the fifth parameter, locals=[], is never used. This value is carried all the way through to where the template is inlined. and it looks like it should set local variables in the template based on what the Erubius class does with it. My question is why is this here? I grep'ed the full stack and _template_for is only ever called with 3 or 4 parameters: merb-cache/merb_ext/controller.rb:86: (3) /merb-core/controller/mixins/render.rb:124: (4) /merb-core/controller/mixins/render.rb:242: (3) /merb-core/controller/mixins/render.rb:382: (3) merb-core/controller/mixins/render.rb:389: (3) /merb-core/controller/mixins/render.rb:390: (3) Is this just old cruft, or a plan for future API changes? I ask because the template caching system uses this as part of the hash (c.f. render.rb: line 415 et. al.) and I am having trouble with this system caching the wrong template in a plug-in I'm working on. I had thought about having the plug-in set the locals field to discriminate between templates, but there is no public way (that I can find) to make this happen Thanks John Miller --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "merb" 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/merb?hl=en -~----------~----~----~----~------~----~------~--~---
