aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/lib/action_view
diff options
context:
space:
mode:
authorEileen M. Uchitelle <eileencodes@users.noreply.github.com>2017-01-16 10:09:56 -0500
committerGitHub <noreply@github.com>2017-01-16 10:09:56 -0500
commitbc33fe551251cbbcce62d78f240746357c979fb8 (patch)
tree195c8093292f51578a527d89b2a716c3d05744d3 /actionview/lib/action_view
parent39c1da1316dada5f7b2adda39a1dbbba06a06442 (diff)
parent761afeb2bb1b674314fb53f691b07c9261949fc3 (diff)
downloadrails-bc33fe551251cbbcce62d78f240746357c979fb8.tar.gz
rails-bc33fe551251cbbcce62d78f240746357c979fb8.tar.bz2
rails-bc33fe551251cbbcce62d78f240746357c979fb8.zip
Merge pull request #27692 from y-yagi/make_render_work_with_ac_params
make `render` work with AC::Params
Diffstat (limited to 'actionview/lib/action_view')
-rw-r--r--actionview/lib/action_view/rendering.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/actionview/lib/action_view/rendering.rb b/actionview/lib/action_view/rendering.rb
index 0e72316eb7..cf18562c45 100644
--- a/actionview/lib/action_view/rendering.rb
+++ b/actionview/lib/action_view/rendering.rb
@@ -124,7 +124,11 @@ module ActionView
key = action.include?(?/) ? :template : :action
options[key] = action
else
- options[:partial] = action
+ if action.respond_to?(:permitted?) && action.permitted?
+ options = action
+ else
+ options[:partial] = action
+ end
end
options