aboutsummaryrefslogtreecommitdiffstats
path: root/guides/rails_guides/helpers.rb
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2012-10-06 17:08:50 -0700
committerXavier Noria <fxn@hashref.com>2012-10-06 17:08:50 -0700
commit93d22512f9f8b753af8fe3f9148bba7cc05654ce (patch)
treed3e6787a101705b23d6fd60d326da0c662813089 /guides/rails_guides/helpers.rb
parent410d376d3c78e6b7740d73bb04dc4a59629518c9 (diff)
parent65a2977cdd55678d3eab06434625375914511786 (diff)
downloadrails-93d22512f9f8b753af8fe3f9148bba7cc05654ce.tar.gz
rails-93d22512f9f8b753af8fe3f9148bba7cc05654ce.tar.bz2
rails-93d22512f9f8b753af8fe3f9148bba7cc05654ce.zip
Merge pull request #6475 from joefiorini/responsive-guides
Responsive guides
Diffstat (limited to 'guides/rails_guides/helpers.rb')
-rw-r--r--guides/rails_guides/helpers.rb10
1 files changed, 8 insertions, 2 deletions
diff --git a/guides/rails_guides/helpers.rb b/guides/rails_guides/helpers.rb
index e6ef656474..a288d0f0f4 100644
--- a/guides/rails_guides/helpers.rb
+++ b/guides/rails_guides/helpers.rb
@@ -24,8 +24,14 @@ module RailsGuides
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)
+ def docs_for_menu(position=nil)
+ if position.nil?
+ documents_by_section
+ elsif position == 'L'
+ documents_by_section.to(3)
+ else
+ documents_by_section.from(4)
+ end
end
def author(name, nick, image = 'credits_pic_blank.gif', &block)