From 03bcd416b04c411973456e33a95756edab4244cd Mon Sep 17 00:00:00 2001 From: Joe Fiorini Date: Sat, 26 May 2012 00:28:24 -0400 Subject: [Guides] Navigation styling for small devices --- guides/rails_guides/helpers.rb | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'guides/rails_guides') 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) -- cgit v1.2.3