lib/lookbook/utils.rb in lookbook-1.0.0.beta.2 vs lib/lookbook/utils.rb in lookbook-1.0.0.beta.3

- old
+ new

@@ -14,11 +14,11 @@ def preview_class_basename(klass) class_name(klass).to_s.chomp("ComponentPreview").chomp("Component::Preview").chomp("::Preview").chomp("Component").chomp("Preview").chomp("::") end - def preview_class_name(klass) + def preview_class_path(klass) preview_class_basename(klass).underscore end def class_name(klass) klass.is_a?(Class) ? klass.name : klass @@ -47,10 +47,10 @@ def to_lookup_path(path) path.split("/").map { |segment| remove_position_prefix(segment) }.join("/") end def to_preview_path(*args) - args.flatten.map { |arg| preview_class_name(arg) }.join("/") + args.flatten.map { |arg| preview_class_path(arg) }.join("/") end protected def default_url_options