app/helpers/scrapbook/helper_for_view.rb in scrapbook-0.2.1 vs app/helpers/scrapbook/helper_for_view.rb in scrapbook-0.2.2
- old
+ new
@@ -8,15 +8,10 @@
self.view = view
end
def short_path_to(pathname, scrapbook = nil)
scrapbook ||= Scrapbook.find_scrapbook_for(pathname)
-
- if scrapbook.root == ::Scrapbook::Engine.config.scrapbook.paths.first
- view.short_page_path(scrapbook.relative_page_path_for(pathname))
- else
- view.book_page_path(scrapbook.relative_page_path_for(pathname), book: scrapbook.name)
- end
+ view.short_page_path(scrapbook.relative_page_path_for(pathname))
end
def remove_handler_exts_from(pathname)
pathname.dirname.join(
pathname.basename.sub(/(?:.#{view.lookup_context.handlers.join('|.')})+\z/, '')