app/helpers/lookbook/application_helper.rb in lookbook-0.9.8 vs app/helpers/lookbook/application_helper.rb in lookbook-1.0.0.beta.0
- old
+ new
@@ -7,14 +7,18 @@
def feature_enabled?(name)
Lookbook::Features.enabled?(name)
end
def landing_path
- landing = feature_enabled?(:pages) ? Lookbook.pages.find(&:landing) || Lookbook.pages.first : nil
+ landing = Lookbook.pages.find(&:landing) || Lookbook.pages.first
if landing.present?
- lookbook_page_path landing.lookup_path
+ page_path(landing.lookup_path)
else
- lookbook_home_path
+ home_path
end
+ end
+
+ def generate_id(*args)
+ args.map { |args| args.delete_prefix("/").tr("&?=/_\-", "-") }.join("-")
end
end
end