404 for pages and asset column error
This commit is contained in:
1 parent
d28a71f5bf
commit
27bdbadf08
3 files changed
+14
-11
No files matched your search
@@ -9,16 +9,19 @@ class PagesController < ApplicationController
|
||||
end
|
||||
end
|
||||
|
||||
def show
|
||||
item = Item.first(:conditions => {:full_name => params[:page_name]})
|
||||
case item._type
|
||||
when 'Page'
|
||||
@page = item
|
||||
render_liquid_page
|
||||
when 'Link'
|
||||
redirect_to "http://#{item[:url]}"
|
||||
def show
|
||||
begin
|
||||
item = Item.first(:conditions => {:full_name => params[:page_name]})
|
||||
case item._type
|
||||
when 'Page'
|
||||
@page = item
|
||||
render_liquid_page
|
||||
when 'Link'
|
||||
redirect_to "http://#{item[:url]}"
|
||||
end
|
||||
rescue
|
||||
render :file => "#{Rails.root}/public/404.html", :status => :not_found
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
Reference in new issue
Block a user