# Rails helper methods for various Bootstrap dropdown menus # # * http://twitter.github.io/bootstrap/components.html#buttonDropdowns # * http://twitter.github.io/bootstrap/components.html#navbar # # @example nav dropdown # <%= nav_dropdown('Admin') do %> # <%= dropdown_item('Users', '/admin/users') %> # <%= dropdown_item('Logs', '/admin/logs') %> # <%= dropdown_divider %> # <%= dropdown_item('Exceptions', '/admin/exceptions') %> # <% end %> # # @example button dropdown # <%= button_dropdown('Actions') do %> # <%= dropdown_item('Action 1', '/action1') %> # <%= dropdown_item('Action 2', '/action2') %> # <% end %> # # @example split-button dropdown # <%= split_button_dropdown('Default', url: '/default') do %> # <%= dropdown_item('Action 1', '/action1') %> # <%= dropdown_item('Action 2', '/action2') %> # <% end %># # module Bootstrap::DropdownHelper # Returns a drop-down menu of links # # Usually called from yielded block of {Bootstrap::NavHelper#nav_bar} # # @param [String] text text of dropdown link # @yield yielded block is usually calls to {Bootstrap::NavHelper#dropdown_item} or {Bootstrap::NavHelper#dropdown_divider} # @return [String] '