diff options
author | Joe Fiorini <joe@joefiorini.com> | 2012-05-26 00:28:24 -0400 |
---|---|---|
committer | Joe Fiorini <joe@joefiorini.com> | 2012-10-06 16:38:37 -0400 |
commit | 03bcd416b04c411973456e33a95756edab4244cd (patch) | |
tree | 79b1d2ff056b632f70e9930526bddef1060d07f0 /guides/rails_guides | |
parent | bcbf1bbba439346b9b16e9b3dbc417d4e3abb717 (diff) | |
download | rails-03bcd416b04c411973456e33a95756edab4244cd.tar.gz rails-03bcd416b04c411973456e33a95756edab4244cd.tar.bz2 rails-03bcd416b04c411973456e33a95756edab4244cd.zip |
[Guides] Navigation styling for small devices
Diffstat (limited to 'guides/rails_guides')
-rw-r--r-- | guides/rails_guides/helpers.rb | 10 |
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) |