Permalink
Browse files

fix doc to reflect actual behaviour; parents do get an active style i…

…f any child is active
  • Loading branch information...
Daniel Haran
Daniel Haran committed May 20, 2009
1 parent bca5c09 commit b7452f75eef3003cc24e3acac6431caefa711268
Showing with 4 additions and 3 deletions.
  1. +1 −1 README
  2. +3 −2 test/semantic_menu_test.rb
View
2 README
@@ -38,7 +38,7 @@ This would look like this:
<li>
<a href="root_path">overview</a>
</li>
- <li>
+ <li class="active">
<a href="comments_path" class="button">comments</a>
<ul class="menu_level_1">
<li class="active">
@@ -76,18 +76,19 @@ def test_parent_is_active_when_any_child_is
assert l1.active?
end
- #def test_example_output_for_developer_laziness
+ # def test_example_output_for_developer_laziness
# MenuItem.any_instance.stubs(:active?).returns(false)
# menu = SemanticMenu.new(nil, :class => 'top_level_nav') do |root|
# root.add "overview", "root_path"
# root.add "comments", "comments_path", :class => 'button' do |comments|
+ # comments.stubs(:active?).returns(true)
# comment_item = comments.add "My Comments", "my_comments_path"
# comment_item.stubs(:active?).returns(true)
# comments.add "Recent", "recent_comments_path"
# end
# end
# puts menu
- #end
+ # end
protected
def default_menu

0 comments on commit b7452f7

Please sign in to comment.