lib/amiba/frontend/views/layout.rb in amiba-0.0.9 vs lib/amiba/frontend/views/layout.rb in amiba-1.0.0
- old
+ new
@@ -14,9 +14,17 @@
def title
"Home"
end
+ def view_url
+ if @page.class == Amiba::Source::Entry
+ "/entries#{@page.link}"
+ else
+ "/pages#{@page.link}"
+ end
+ end
+
def edit_url
if @page.class == Amiba::Source::Entry
"/entries/edit#{@page.link}"
else
"/pages/edit#{@page.link}"