The code looks like this:
db_table
.where('some condition')
.joins('another table')
.find_each do |table_record|
puts table_record.name
end
Is there a rubocop rule that allows you to add indent after do
?
db_table
.where('some condition')
.joins('another table')
.find_each do |table_record|
puts table_record.name
end
CodePudding user response:
Looking at Rubocop docs this seems to be the cop you are looking for:
CodePudding user response:
This in rubocop.yml helps me
Layout/BlockAlignment:
EnforcedStyleAlignWith: start_of_block
It forced me to move last end
:
db_table
.where('some condition')
.joins('another table')
.find_each do |table_record|
puts table_record.name
end
and then rubocop force to use indentation