diff options
author | Yehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com> | 2009-04-27 18:21:26 -0700 |
---|---|---|
committer | Yehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com> | 2009-05-01 17:31:01 -0700 |
commit | 8a4e77b4200946ba4ed42fe5927a7400a846063a (patch) | |
tree | 4d61ebd026f32bd9af32c93f93b3071232b1d8ee /actionpack/lib/action_controller/new_base | |
parent | 34509777fd375e5bc529f21ca66cf63263c2cf64 (diff) | |
download | rails-8a4e77b4200946ba4ed42fe5927a7400a846063a.tar.gz rails-8a4e77b4200946ba4ed42fe5927a7400a846063a.tar.bz2 rails-8a4e77b4200946ba4ed42fe5927a7400a846063a.zip |
OMG, a lot of work
Diffstat (limited to 'actionpack/lib/action_controller/new_base')
-rw-r--r-- | actionpack/lib/action_controller/new_base/base.rb | 2 | ||||
-rw-r--r-- | actionpack/lib/action_controller/new_base/compatibility.rb | 12 |
2 files changed, 14 insertions, 0 deletions
diff --git a/actionpack/lib/action_controller/new_base/base.rb b/actionpack/lib/action_controller/new_base/base.rb index 08e7a1a0e7..75fe012aed 100644 --- a/actionpack/lib/action_controller/new_base/base.rb +++ b/actionpack/lib/action_controller/new_base/base.rb @@ -50,6 +50,8 @@ module ActionController @_request = ActionDispatch::Request.new(env) @_response = ActionDispatch::Response.new process(@_request.parameters[:action]) + @_response.prepare! + self end # :api: private diff --git a/actionpack/lib/action_controller/new_base/compatibility.rb b/actionpack/lib/action_controller/new_base/compatibility.rb new file mode 100644 index 0000000000..8682493c8e --- /dev/null +++ b/actionpack/lib/action_controller/new_base/compatibility.rb @@ -0,0 +1,12 @@ +module ActionController + module Rails2Compatibility + + def render_to_body(options) + if options.is_a?(Hash) && options.key?(:template) + options[:template].sub!(/^\//, '') + end + super + end + + end +end
\ No newline at end of file |