lib/comfortable_mexican_sofa/extensions/rails.rb
# Like a normal collect, only with index
Like a normal collect, only with index
Like a normal collect only with index
def collect_with_index
    result = []
    self.each_with_index do |elt, idx|
      result << yield(elt, idx)
    end
    result
  end
def collect_with_index result = [ ] self . each_with_index do | elt , idx | result << yield ( elt , idx ) end result end
Like a normal collect, only with index
Like a normal collect only with index