Ruby/Rails does lots of cool stuff when it comes to sugar for basic things, and I think there\'s a very common scenario that I was wondering if anyone has done a helper or s
KISS
arr.each.with_index do |obj, index| p 'first' if index == 0 p 'last' if index == arr.count-1 end