app/controllers/lookbook/previews_controller.rb in lookbook-0.8.3 vs app/controllers/lookbook/previews_controller.rb in lookbook-0.9.0
- old
+ new
@@ -43,14 +43,14 @@
def lookup_entities
@example = Lookbook.previews.find_example(params[:path])
if @example
@preview = @example.preview
if params[:path] == @preview&.lookup_path
- redirect_to show_path "#{params[:path]}/#{@preview.default_example.name}"
+ redirect_to lookbook_inspect_path "#{params[:path]}/#{@preview.default_example.name}"
end
else
first_example = Lookbook.previews.find(params[:path])&.examples&.first
- redirect_to show_path(first_example.lookup_path) if first_example
+ redirect_to lookbook_inspect_path(first_example.lookup_path) if first_example
end
end
def set_title
@title = @example.present? ? [@example&.label, @preview&.label].compact.join(" :: ") : "Not found"