BeautifyRuby
BeautifyRuby copied to clipboard
Heredoc EOF Indented
The ending EOF in a heredoc is indented this is breaking the heredoc:
body =<<EOF
This is a test email to send an attachement.
EOF
Same issue for me:
self.joins(<<sql
LEFT JOIN allergens_recipes ON allergens_recipes.recipe_id = recipes.id
LEFT JOIN allergens ON allergens_recipes.allergen_id = allergens.id
sql
)
.where(sql_query , *params_query)
.group(:id)
.paginate( :page => params[:page] )
.order('id DESC')
becomes:
self.joins(<<sql
LEFT JOIN allergens_recipes ON allergens_recipes.recipe_id = recipes.id
LEFT JOIN allergens ON allergens_recipes.allergen_id = allergens.id
sql
)
.where(sql_query , *params_query)
.group(:id)
.paginate( :page => params[:page] )
.order('id DESC')
and this broke my code