diff options
author | Eileen M. Uchitelle <eileencodes@users.noreply.github.com> | 2017-01-16 10:09:56 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-16 10:09:56 -0500 |
commit | bc33fe551251cbbcce62d78f240746357c979fb8 (patch) | |
tree | 195c8093292f51578a527d89b2a716c3d05744d3 /actionview/lib | |
parent | 39c1da1316dada5f7b2adda39a1dbbba06a06442 (diff) | |
parent | 761afeb2bb1b674314fb53f691b07c9261949fc3 (diff) | |
download | rails-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')
-rw-r--r-- | actionview/lib/action_view/rendering.rb | 6 |
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 |