lib/lookbook/preview.rb in lookbook-0.7.2.beta.0 vs lib/lookbook/preview.rb in lookbook-0.7.2.beta.1
- old
+ new
@@ -66,11 +66,11 @@
end
Pathname.new(Dir["#{base_path}/#{name.underscore}.rb"].first)
end
def preview_paths
- ViewComponent::Preview.preview_paths
+ ViewComponent::Base.preview_paths
end
def parent_collections_names
File.dirname(path).split("/")
end
@@ -141,10 +141,11 @@
@loaded_files.push(file[:rel_path])
rescue => exception
Rails.logger.error "[lookbook] preview error\n#{exception.full_message}\n"
@errors.push(Lookbook::Error.new(exception, {
title: "Preview #{exception.class}",
- file_name: file[:rel_path]
+ file_name: file[:rel_path],
+ file_path: file[:path]
}))
end
end
def preview_files