Permalink
Browse files

moves url_for helper to App

  • Loading branch information...
1 parent c691fe0 commit 3eb1b2346d5786003dd3d81f219f1a5b30335fa6 @pengwynn committed Sep 25, 2011
Showing with 5 additions and 3 deletions.
  1. +5 −3 lib/nesta-plugin-linkable/init.rb
@@ -2,15 +2,17 @@ module Nesta
module Plugin
module Linkable
module Helpers
- def url_for(page)
- page.is_linked? ? page.metadata('url') : super
- end
end
end
end
class App
helpers Nesta::Plugin::Linkable::Helpers
+
+ def url_for(page)
+ page.is_linked? ? page.metadata('url') : File.join(base_url, page.path)
+ end
+
end
class Page

0 comments on commit 3eb1b23

Please sign in to comment.