app/controllers/lookbook/previews_controller.rb in lookbook-1.5.0 vs app/controllers/lookbook/previews_controller.rb in lookbook-1.5.1

- old
+ new

@@ -8,9 +8,29 @@ def self.controller_path "lookbook/previews" end + def index + respond_to do |format| + format.json do + render( + json: Lookbook.previews.map do |preview| + { + name: preview.name, + examples: preview.examples.map { |example| + { + inspect_path: example.url_path, + name: example.name + } + } + } + end + ) + end + end + end + def show if @target begin opts = {layout: @preview.layout} if params[:lookbook_embed] == "true"