used flat_map instead of map.flatten in /guides/rails_guides/helpers.rb

This commit is contained in:
Karunakar (Ruby) 2013-08-04 01:05:52 +05:30
parent 50029ba5a1
commit 4f9ae6cfc6
1 changed files with 1 additions and 1 deletions

View File

@ -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)