lib/rafters/component_renderer.rb in rafters-0.2.0 vs lib/rafters/component_renderer.rb in rafters-1.0.0

- old
+ new

@@ -5,18 +5,16 @@ Rafters.view_paths.each do |view_path| @controller.prepend_view_path(view_path) end end - def render(component, template_name = nil) + def render(component) component.controller = @controller - template_name = (template_name || component.template_name) - store(component) @controller.view_context.content_tag(:div, class: "component", id: component.identifier) do - @controller.view_context.render(file: "/#{template_name}", locals: component.attributes) + @controller.view_context.render(file: "/#{component.template_name}", locals: component.attributes) end end private