diff --git a/railties/guides/rails_guides/helpers.rb b/railties/guides/rails_guides/helpers.rb index 45ad9b9588..e6ef656474 100644 --- a/railties/guides/rails_guides/helpers.rb +++ b/railties/guides/rails_guides/helpers.rb @@ -11,15 +11,23 @@ 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 finished_documents(documents) + documents.reject { |document| document['work_in_progress'] } + end + + def docs_for_menu(position) + position == 'L' ? documents_by_section.to(3) : documents_by_section.from(4) + end + def author(name, nick, image = 'credits_pic_blank.gif', &block) image = "images/#{image}" diff --git a/railties/guides/source/documents.yaml b/railties/guides/source/documents.yaml index dccfefb4fb..58713a08a8 100644 --- a/railties/guides/source/documents.yaml +++ b/railties/guides/source/documents.yaml @@ -84,7 +84,7 @@ url: configuring.html description: This guide covers the basic configuration settings for a Rails application. - - name: Rails Command Line Tools and Rake tasks + name: Rails Command Line Tools and Rake Tasks url: command_line.html description: This guide covers the command line tools and rake tasks provided by Rails. - diff --git a/railties/guides/source/layout.html.erb b/railties/guides/source/layout.html.erb index e69936b43a..84427b380c 100644 --- a/railties/guides/source/layout.html.erb +++ b/railties/guides/source/layout.html.erb @@ -44,51 +44,16 @@
  • Guides Index
  • Contribute