lib/lookbook/preview_controller.rb in lookbook-1.0.0.rc.1 vs lib/lookbook/preview_controller.rb in lookbook-1.0.0.rc.2
- old
+ new
@@ -12,10 +12,10 @@
opts[:layout] = nil
opts[:locals] = locals if locals.present?
render html: render_to_string(template, **opts)
end
- def render_in_layout_to_string(template, locals, **opts)
+ def render_in_layout_to_string(template, locals, opts = {})
append_view_path Lookbook::Engine.root.join("app/views")
html = render_to_string(template, locals: locals, **determine_layout(opts[:layout]))
if opts[:append_html].present?
html += opts[:append_html]
end