From cad8a2018752050dcd536c255f3865c2a8bb30c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Strza=C5=82kowski?= Date: Wed, 3 Jul 2013 14:38:20 +0200 Subject: Rename abstract_controller/rendering. to errors.rb Since all rendering stuff was extracted to AV, the only thing that left was single class with error so file name wasn't relevant anymore --- actionpack/lib/abstract_controller.rb | 2 +- actionpack/lib/abstract_controller/errors.rb | 9 +++++++++ actionpack/lib/abstract_controller/rendering.rb | 9 --------- 3 files changed, 10 insertions(+), 10 deletions(-) create mode 100644 actionpack/lib/abstract_controller/errors.rb delete mode 100644 actionpack/lib/abstract_controller/rendering.rb (limited to 'actionpack') diff --git a/actionpack/lib/abstract_controller.rb b/actionpack/lib/abstract_controller.rb index 909b438a41..5c07753075 100644 --- a/actionpack/lib/abstract_controller.rb +++ b/actionpack/lib/abstract_controller.rb @@ -10,7 +10,7 @@ module AbstractController autoload :Base autoload :Callbacks autoload :Collector - autoload :DoubleRenderError, "abstract_controller/rendering.rb" + autoload :DoubleRenderError, "abstract_controller/errors.rb" autoload :Helpers autoload :Logger autoload :Translation diff --git a/actionpack/lib/abstract_controller/errors.rb b/actionpack/lib/abstract_controller/errors.rb new file mode 100644 index 0000000000..8997207550 --- /dev/null +++ b/actionpack/lib/abstract_controller/errors.rb @@ -0,0 +1,9 @@ +module AbstractController + class DoubleRenderError < Error + DEFAULT_MESSAGE = "Render and/or redirect were called multiple times in this action. Please note that you may only call render OR redirect, and at most once per action. Also note that neither redirect nor render terminate execution of the action, so if you want to exit an action after redirecting, you need to do something like \"redirect_to(...) and return\"." + + def initialize(message = nil) + super(message || DEFAULT_MESSAGE) + end + end +end diff --git a/actionpack/lib/abstract_controller/rendering.rb b/actionpack/lib/abstract_controller/rendering.rb deleted file mode 100644 index 8997207550..0000000000 --- a/actionpack/lib/abstract_controller/rendering.rb +++ /dev/null @@ -1,9 +0,0 @@ -module AbstractController - class DoubleRenderError < Error - DEFAULT_MESSAGE = "Render and/or redirect were called multiple times in this action. Please note that you may only call render OR redirect, and at most once per action. Also note that neither redirect nor render terminate execution of the action, so if you want to exit an action after redirecting, you need to do something like \"redirect_to(...) and return\"." - - def initialize(message = nil) - super(message || DEFAULT_MESSAGE) - end - end -end -- cgit v1.2.3