Skip to content

Commit eaeda21

Browse files
authored
Merge pull request #245 from xinminlabs/awesomecode-format-ruby-code-58196
Auto corrected by following Format Ruby Code
2 parents 061d79d + 4a1e98c commit eaeda21

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/rails/prefer_nor_conditions.rb

+2-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@
2121

2222
within_files Synvert::ALL_RUBY_FILES do
2323
find_node '.send[receiver=.send[message=where][arguments.size=0]][message=not][arguments.size=1][arguments.0=.hash[pairs.length>1]]' do
24-
new_source = node.arguments[0].pairs.map { |pair| "where.not(#{pair.to_source})" }.join('.')
24+
new_source = node.arguments[0].pairs.map { |pair| "where.not(#{pair.to_source})" }
25+
.join('.')
2526
replace 'receiver.message', :message, :parentheses, with: new_source
2627
end
2728
end

0 commit comments

Comments
 (0)