Permalink
Browse files

Remove deprecated logic to render templates starting with /

  render :template => "/foo/bar"
  • Loading branch information...
1 parent 4970048 commit bb33e88833575184b3bd2d0877ea92e170672cde @carlosantoniodasilva carlosantoniodasilva committed Jan 15, 2012
@@ -21,7 +21,6 @@ def _normalize_options(options)
end
def render_to_body(options)
- options[:template].sub!(/^\//, '') if options.key?(:template)
super || " "
end
@@ -201,26 +201,4 @@ class TestWithLayout < Rack::TestCase
assert_status 200
end
end
-
- module Compatibility
- class WithoutLayoutController < ActionController::Base
- self.view_paths = [ActionView::FixtureResolver.new(
- "test/basic.html.erb" => "Hello from basic.html.erb",
- "shared.html.erb" => "Elastica"
- )]
-
- def with_forward_slash
- render :template => "/test/basic"
- end
- end
-
- class TestTemplateRenderWithForwardSlash < Rack::TestCase
- test "rendering a normal template with full path starting with a leading slash" do
- get "/render_template/compatibility/without_layout/with_forward_slash"
-
- assert_body "Hello from basic.html.erb"
- assert_status 200
- end
- end
- end
end

0 comments on commit bb33e88

Please sign in to comment.