lib/retter/page/view_helper.rb in retter-0.2.2 vs lib/retter/page/view_helper.rb in retter-0.2.3

- old
+ new

@@ -1,19 +1,27 @@ # coding: utf-8 module Retter module Page::ViewHelper - include Stationery + include Site def entry_path(*args) case args.first when Date, Time entry_path_by_date(*args) when Entry entry_path_by_entry(args.first) else raise TypeError, "wrong argument type #{args.first.class} (expected Date, Time or Retter::Entry)" end + end + + def entry_url(*args) + URI.parse(config.url) + entry_path(*args) + end + + def article_url(*args) + URI.parse(config.url) + article_path(*args) end def article_path(*args) case args.first when Date, Time