aboutsummaryrefslogtreecommitdiffstats
path: root/guides/rails_guides/helpers.rb
diff options
context:
space:
mode:
authorSantiago Pastorino <santiago@wyeworks.com>2012-10-05 11:52:20 -0300
committerSantiago Pastorino <santiago@wyeworks.com>2012-10-05 11:52:20 -0300
commitabf8de85519141496a6773310964ec03f6106f3f (patch)
tree5149d0c61125567f0e704d2f520611a1718e168a /guides/rails_guides/helpers.rb
parent5c078368c762ec025997af6b2c94632b2f9301d2 (diff)
downloadrails-abf8de85519141496a6773310964ec03f6106f3f.tar.gz
rails-abf8de85519141496a6773310964ec03f6106f3f.tar.bz2
rails-abf8de85519141496a6773310964ec03f6106f3f.zip
Use flat_map { } instead of map {}.flatten
Diffstat (limited to 'guides/rails_guides/helpers.rb')
-rw-r--r--guides/rails_guides/helpers.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/guides/rails_guides/helpers.rb b/guides/rails_guides/helpers.rb
index e6ef656474..c8ab9e4536 100644
--- a/guides/rails_guides/helpers.rb
+++ b/guides/rails_guides/helpers.rb
@@ -17,7 +17,7 @@ module RailsGuides
end
def documents_flat
- documents_by_section.map {|section| section['documents']}.flatten
+ documents_by_section.flat_map {|section| section['documents']}
end
def finished_documents(documents)