diff options
author | Rafael Mendonça França <rafael@franca.dev> | 2019-07-25 16:18:18 -0400 |
---|---|---|
committer | Rafael Mendonça França <rafael@franca.dev> | 2019-07-25 16:18:18 -0400 |
commit | c9b7b9ff8adb3f01db0f9af90359030028a33b5b (patch) | |
tree | 02cf4d079caaa6f5553067f049950657714ad44f /actionview/lib | |
parent | 706ee3eb490781387e9a7e00ab9cfdb3d3dbf264 (diff) | |
parent | 459657a9f86f2ff951608e21b4b217e1057c50af (diff) | |
download | rails-c9b7b9ff8adb3f01db0f9af90359030028a33b5b.tar.gz rails-c9b7b9ff8adb3f01db0f9af90359030028a33b5b.tar.bz2 rails-c9b7b9ff8adb3f01db0f9af90359030028a33b5b.zip |
Merge pull request #36412 from robotdana/compact_blank
Add compact_blank shortcut for reject(&:blank?)
Diffstat (limited to 'actionview/lib')
-rw-r--r-- | actionview/lib/action_view/testing/resolvers.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionview/lib/action_view/testing/resolvers.rb b/actionview/lib/action_view/testing/resolvers.rb index 539bedcdf0..99443663dd 100644 --- a/actionview/lib/action_view/testing/resolvers.rb +++ b/actionview/lib/action_view/testing/resolvers.rb @@ -41,7 +41,7 @@ module ActionView #:nodoc: ) end - templates.sort_by { |t| -t.identifier.match(/^#{query}$/).captures.reject(&:blank?).size } + templates.sort_by { |t| -t.identifier.match(/^#{query}$/).captures.compact_blank.size } end end |