diff options
author | Carlhuda <carlhuda@engineyard.com> | 2010-02-26 15:56:17 -0800 |
---|---|---|
committer | Carlhuda <carlhuda@engineyard.com> | 2010-02-26 15:56:17 -0800 |
commit | dae109a4632af702b8556ecf029a27d91476848b (patch) | |
tree | 865eda97f82e56d060949fdaeed026bcf544b158 /actionpack/lib/action_controller/metal/redirecting.rb | |
parent | 3bad24c85d973295df55a04272a4e1829eab4685 (diff) | |
download | rails-dae109a4632af702b8556ecf029a27d91476848b.tar.gz rails-dae109a4632af702b8556ecf029a27d91476848b.tar.bz2 rails-dae109a4632af702b8556ecf029a27d91476848b.zip |
Including UrlFor in Redirecting and Head will warn usefully if a controller is wired up without a router included (and still support redirect_to "omg")
Diffstat (limited to 'actionpack/lib/action_controller/metal/redirecting.rb')
-rw-r--r-- | actionpack/lib/action_controller/metal/redirecting.rb | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/actionpack/lib/action_controller/metal/redirecting.rb b/actionpack/lib/action_controller/metal/redirecting.rb index de40ea77b1..25e4e18493 100644 --- a/actionpack/lib/action_controller/metal/redirecting.rb +++ b/actionpack/lib/action_controller/metal/redirecting.rb @@ -12,6 +12,7 @@ module ActionController include AbstractController::Logger include ActionController::RackDelegation + include ActionController::UrlFor # Redirects the browser to the target specified in +options+. This parameter can take one of three forms: # @@ -83,9 +84,6 @@ module ActionController raise RedirectBackError unless refer = request.headers["Referer"] refer else - # ROUTES TODO: Figure out how to rescue from a no method error - # This is needed only if you wire up a controller yourself, and - # this not working would be baffling without a better error url_for(options) end.gsub(/[\r\n]/, '') end |