Avoid Putting Logic in Map Blocks
The contents of a `map` block should probably be an instance method on each item.As Rubyists, we write map blocks all the time. These blocks tend to pick up logic that belongs elsewhere. Consider this innocent looking piece of code.
Avoid Putting Logic in Map Blocks #ruby #rubydeveloper #rubyonrails