app/controllers/lookbook/app_controller.rb in lookbook-0.4.0.beta.2 vs app/controllers/lookbook/app_controller.rb in lookbook-0.4.1

- old
+ new

@@ -94,23 +94,23 @@ label: example.label, html: preview_controller.render_example_to_string(@preview, example.name) } end set_params - joined = render_to_string "lookbook/preview_group", locals: {examples: examples}, layout: nil - preview_controller.render_in_layout_to_string(joined, @preview.lookbook_layout || current_layout) + layout = @preview.lookbook_layout || Rails.configuration.view_component.default_preview_layout || current_layout + preview_controller.render_in_layout_to_string("lookbook/preview/group", {examples: examples}, layout) else set_params(@example) preview_controller.params[:path] = "#{@preview.preview_name}/#{@example.name}".chomp("/") preview_controller.process(:previews) end end def set_params(example = nil) - example_params = @preview.lookbook_display_params.deep_merge(example ? example.lookbook_display_params : {}) + example_params = example.nil? ? @preview.display_params : example.display_params preview_controller.params.merge!({ lookbook: { - display: Lookbook.config.preview_display_params.deep_merge(example_params) + display: example_params } }) end def current_layout