{"action":"created","issue":{"url":"https://api.github.com/repos/seyhunak/twitter-bootstrap-rails/issues/858","labels_url":"https://api.github.com/repos/seyhunak/twitter-bootstrap-rails/issues/858/labels{/name}","comments_url":"https://api.github.com/repos/seyhunak/twitter-bootstrap-rails/issues/858/comments","events_url":"https://api.github.com/repos/seyhunak/twitter-bootstrap-rails/issues/858/events","html_url":"https://github.com/seyhunak/twitter-bootstrap-rails/issues/858","id":79632424,"number":858,"title":"menu_item should not mark \"chosen\" items as \"active\"","user":{"login":"markpmitchell","id":1399148,"avatar_url":"https://avatars.githubusercontent.com/u/1399148?v=3","gravatar_id":"","url":"https://api.github.com/users/markpmitchell","html_url":"https://github.com/markpmitchell","followers_url":"https://api.github.com/users/markpmitchell/followers","following_url":"https://api.github.com/users/markpmitchell/following{/other_user}","gists_url":"https://api.github.com/users/markpmitchell/gists{/gist_id}","starred_url":"https://api.github.com/users/markpmitchell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markpmitchell/subscriptions","organizations_url":"https://api.github.com/users/markpmitchell/orgs","repos_url":"https://api.github.com/users/markpmitchell/repos","events_url":"https://api.github.com/users/markpmitchell/events{/privacy}","received_events_url":"https://api.github.com/users/markpmitchell/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-05-22T22:18:16Z","updated_at":"2015-07-05T20:43:25Z","closed_at":null,"body":"When using the navbar helper, menu_item marks an item with the CSS \"active\" class if the menu item is either \"active\" (the current page) or \"chosen\" (the URI for the link is the first part of the current page). This seems wrong for several reasons:\r\n\r\n1. If there are menu items for \"/posts\" and \"/posts/new\", and the current page is \"/posts/new\", the \"/posts\" item should not be active.\r\n\r\n2. If there are menu items for \"/post\" and \"/poster\", and the current page is \"/poster\", the \"/post\" item should *definitely* not be active.\r\n\r\nTherefore, is_active? should be changed simply to check current_page?(page). (current_page? is part of the Rails API.) uri_state is only used from is_active and could be deleted -- or, if necessary, retained as-is for backwards compatibility.\r\n\r\nIf the project maintainers agree, I am happy to make a pull request.\r\n"},"comment":{"url":"https://api.github.com/repos/seyhunak/twitter-bootstrap-rails/issues/comments/118666664","html_url":"https://github.com/seyhunak/twitter-bootstrap-rails/issues/858#issuecomment-118666664","issue_url":"https://api.github.com/repos/seyhunak/twitter-bootstrap-rails/issues/858","id":118666664,"user":{"login":"ammit","id":2105944,"avatar_url":"https://avatars.githubusercontent.com/u/2105944?v=3","gravatar_id":"","url":"https://api.github.com/users/ammit","html_url":"https://github.com/ammit","followers_url":"https://api.github.com/users/ammit/followers","following_url":"https://api.github.com/users/ammit/following{/other_user}","gists_url":"https://api.github.com/users/ammit/gists{/gist_id}","starred_url":"https://api.github.com/users/ammit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ammit/subscriptions","organizations_url":"https://api.github.com/users/ammit/orgs","repos_url":"https://api.github.com/users/ammit/repos","events_url":"https://api.github.com/users/ammit/events{/privacy}","received_events_url":"https://api.github.com/users/ammit/received_events","type":"User","site_admin":false},"created_at":"2015-07-05T20:43:25Z","updated_at":"2015-07-05T20:43:25Z","body":":+1: \r\n"}}