app/controllers/simplec/pages_controller.rb in simplec-0.4.0 vs app/controllers/simplec/pages_controller.rb in simplec-0.4.1
- old
+ new
@@ -1,13 +1,21 @@
require_dependency "simplec/application_controller"
require_dependency "simplec/page_action_helpers"
module Simplec
class PagesController < ApplicationController
+ include Simplec::ActionController::Extensions
include Simplec::PageActionHelpers
def show
- render_path params[:path] || ''
+ begin
+ render_path params[:path] || ''
+ rescue ActiveRecord::SubclassNotFound => e
+ # TODO add proc config for error notification, airbrake, etc
+ #
+ Rails.logger.info e
+ render status: 404
+ end
end
end
end