diff options
author | Xavier Noria <fxn@hashref.com> | 2011-12-24 17:26:18 -0800 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2011-12-24 17:33:18 -0800 |
commit | 69cc645c70bdbd4e0a43f176a66197d6b07d1dd7 (patch) | |
tree | 7d6f5d62a6230f600eca5cb1dd7226aac1047995 /railties/guides/rails_guides/helpers.rb | |
parent | bea3524e3f5a56e4dc87ae240a2c58301e73a128 (diff) | |
download | rails-69cc645c70bdbd4e0a43f176a66197d6b07d1dd7.tar.gz rails-69cc645c70bdbd4e0a43f176a66197d6b07d1dd7.tar.bz2 rails-69cc645c70bdbd4e0a43f176a66197d6b07d1dd7.zip |
(draft) guides for the Kindle and Kindle apps [Mip Earson & Xavier Noria]
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}" |