app/controllers/lookbook/previews_controller.rb in lookbook-0.8.2 vs app/controllers/lookbook/previews_controller.rb in lookbook-0.8.3
- old
+ new
@@ -26,12 +26,12 @@
def show
if @example
begin
set_params
@examples = examples_data
- @drawer_panels = drawer_panels.filter { |name, panel| panel[:show] }
- @preview_panels = preview_panels.filter { |name, panel| panel[:show] }
+ @drawer_panels = drawer_panels.select { |name, panel| panel[:show] }
+ @preview_panels = preview_panels.select { |name, panel| panel[:show] }
rescue => exception
render_in_layout "lookbook/error", error: prettify_error(exception)
end
else
render_in_layout "not_found"
@@ -131,10 +131,10 @@
notes: {
label: "Notes",
template: "lookbook/previews/panels/notes",
hotkey: "n",
show: true,
- disabled: @examples.filter { |e| e[:notes].present? }.none?
+ disabled: @examples.select { |e| e[:notes].present? }.none?
},
params: {
label: "Params",
template: "lookbook/previews/panels/params",
hotkey: "p",