2012-10-05から1日間の記事一覧

rubyのflat_mapって何?

Use the `flat_map` method. · d56b5da · rails/rails を見ていて、へーと思ったのでメモ。 # before attributes.map do |attribute| _validators[attribute.to_sym] end.flatten # after attributes.flat_map do |attribute| _validators[attribute.to_sym]…