lib/rubocop/cop/standard/rails_render_inline.rb in rubocop-standard-1.15.1 vs lib/rubocop/cop/standard/rails_render_inline.rb in rubocop-standard-2.0
- old
+ new
@@ -16,12 +16,10 @@
(pair (sym :inline) $_)
PATTERN
def on_send(node)
if option_pairs = render_with_options?(node)
- if option_pairs.detect { |pair| inline_key?(pair) }
- add_offense(node, location: :expression)
- end
+ add_offense(node, location: :expression) if option_pairs.detect { |pair| inline_key?(pair) }
end
end
end
end
end