diff --git a/app/controllers/pages_controller.rb b/app/controllers/pages_controller.rb index 8c6b8000..8f68e216 100644 --- a/app/controllers/pages_controller.rb +++ b/app/controllers/pages_controller.rb @@ -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 diff --git a/app/views/admin/assets/index.html.erb b/app/views/admin/assets/index.html.erb index 093696cf..a3f77742 100644 --- a/app/views/admin/assets/index.html.erb +++ b/app/views/admin/assets/index.html.erb @@ -12,7 +12,7 @@