aboutsummaryrefslogtreecommitdiffstats
path: root/railties/guides/rails_guides/helpers.rb
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2011-12-24 17:26:18 -0800
committerXavier Noria <fxn@hashref.com>2011-12-24 17:32:52 -0800
commit8eb359661745adc639d43cf7da9a92fc1f6c9539 (patch)
tree6d87ae4e88c83e5e533566eb9492dd53b0de2a98 /railties/guides/rails_guides/helpers.rb
parent41e466fda827b9e002bb356e34ba4b82f7b72059 (diff)
downloadrails-8eb359661745adc639d43cf7da9a92fc1f6c9539.tar.gz
rails-8eb359661745adc639d43cf7da9a92fc1f6c9539.tar.bz2
rails-8eb359661745adc639d43cf7da9a92fc1f6c9539.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.rb8
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}"