• C
    Improve and cleanup a bit partial renderer · 700c5835
    Carlos Antonio da Silva 提交于
    * Remove template assignment: there is no need for this assignment,
      given we are rendering a collection with possibly different templates,
      and a second call to render (with the same instance) would behave
      differently if the template is set.
    * Remove segments array in favor of Array#map
    * Use local vars whenever possible
    * Cache local template keys, remove defaults from find_template
    700c5835
partial_renderer.rb 15.4 KB