Revert "Allow usage of strings as locals for partial renderer"
This commit is contained in:
parent
c1e949e9e6
commit
d5fcb5b9ad
@ -363,7 +363,7 @@ def setup(context, options, block)
|
||||
@options = options
|
||||
@block = block
|
||||
|
||||
@locals = options[:locals] ? options[:locals].symbolize_keys : {}
|
||||
@locals = options[:locals] || {}
|
||||
@details = extract_details(options)
|
||||
|
||||
prepend_formats(options[:formats])
|
||||
|
@ -485,10 +485,6 @@ def partial_with_locals
|
||||
render partial: "customer", locals: { customer: Customer.new("david") }
|
||||
end
|
||||
|
||||
def partial_with_string_locals
|
||||
render partial: "customer", locals: { "customer" => Customer.new("david") }
|
||||
end
|
||||
|
||||
def partial_with_form_builder
|
||||
render partial: ActionView::Helpers::FormBuilder.new(:post, nil, view_context, {})
|
||||
end
|
||||
@ -691,7 +687,6 @@ class RenderTest < ActionController::TestCase
|
||||
get :partial_with_locals, to: "test#partial_with_locals"
|
||||
get :partial_with_nested_object, to: "test#partial_with_nested_object"
|
||||
get :partial_with_nested_object_shorthand, to: "test#partial_with_nested_object_shorthand"
|
||||
get :partial_with_string_locals, to: "test#partial_with_string_locals"
|
||||
get :partials_list, to: "test#partials_list"
|
||||
get :render_action_hello_world, to: "test#render_action_hello_world"
|
||||
get :render_action_hello_world_as_string, to: "test#render_action_hello_world_as_string"
|
||||
@ -1292,11 +1287,6 @@ def test_partial_with_locals
|
||||
assert_equal "Hello: david", @response.body
|
||||
end
|
||||
|
||||
def test_partial_with_string_locals
|
||||
get :partial_with_string_locals
|
||||
assert_equal "Hello: david", @response.body
|
||||
end
|
||||
|
||||
def test_partial_with_form_builder
|
||||
get :partial_with_form_builder
|
||||
assert_equal "<label for=\"post_title\">Title</label>\n", @response.body
|
||||
|
Loading…
Reference in New Issue
Block a user