diff options
Diffstat (limited to 'railties/guides/rails_guides/helpers.rb')
-rw-r--r-- | railties/guides/rails_guides/helpers.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/railties/guides/rails_guides/helpers.rb b/railties/guides/rails_guides/helpers.rb index 463df8a7a8..45ad9b9588 100644 --- a/railties/guides/rails_guides/helpers.rb +++ b/railties/guides/rails_guides/helpers.rb @@ -11,6 +11,14 @@ module RailsGuides result << content_tag(:dd, capture(&block)) result end + + def documents_by_section + @documents_by_section ||= YAML.load_file(File.expand_path('../../source/documents.yaml', __FILE__)) + end + + def documents_flat + documents_by_section.map {|section| section['documents']}.flatten + end def author(name, nick, image = 'credits_pic_blank.gif', &block) image = "images/#{image}" |