app/controllers/lookbook/previews_controller.rb in lookbook-1.0.0.beta.1 vs app/controllers/lookbook/previews_controller.rb in lookbook-1.0.0.beta.2

- old
+ new

@@ -42,26 +42,26 @@ end end def show_legacy Lookbook.logger.warn("Legacy URL path detected. These paths are deprecated and will be removed in a future version") - redirect_to inspect_path params[:path] + redirect_to lookbook_inspect_path params[:path] end private def lookup_entities @example = Lookbook.previews.find_example(params[:path]) if @example.present? @preview = @example.preview if params[:path] == @preview&.lookup_path - redirect_to inspect_path "#{params[:path]}/#{@preview.default_example.name}" + redirect_to lookbook_inspect_path "#{params[:path]}/#{@preview.default_example.name}" end else @preview = Lookbook.previews.find(params[:path]) if @preview.present? first_example = @preview.examples.first - redirect_to inspect_path(first_example.lookup_path) if first_example + redirect_to lookbook_inspect_path(first_example.lookup_path) if first_example else @preview = Lookbook.previews.find(path_segments.slice(0, path_segments.size - 1).join("/")) end end end