lib/vex/action_controller/error.rb in vex-0.4.4 vs lib/vex/action_controller/error.rb in vex-0.6.2
- old
+ new
@@ -18,9 +18,17 @@
base.rescue_from ActionController::Error::Exception, :with => :rescue_custom_exceptions
base.rescue_from ActionController::RoutingError, :with => :rescue_404
base.rescue_from ActionController::UnknownAction, :with => :rescue_404
end
+ def to_s
+ "#{super}: #{@text}"
+ end
+
+ def inspect
+ "#{super}: #{@text.inspect}"
+ end
+
private
def rescue_404
@text = "You may have mistyped the address or the page may have moved."
render :layout => "layouts/404", :text => "", :status => 404