app/helpers/application_helper.rb
# render a bootstrap button for our search navbar, with appropriate
# active status. eg:
#     <%= render_search_button("Catalog", current_search_area == :catalog,
#            search_url_context(:controller => "catalog", :action => "index")) %>
render a bootstrap button for our search navbar, with appropriate
active status.
render a bootstrap button for our search navbar with appropriate active status .
def render_search_button(label, active_condition, url_arg)
     link_to_unless(active_condition, label, url_arg, :class => "search-option btn btn-outline-secondary") do
        content_tag(:span, label, :class => "search-option btn active btn-primary")
      end
  end
def render_search_button ( label , active_condition , url_arg ) link_to_unless ( active_condition , label , url_arg , :class => "search-option btn btn-outline-secondary" ) do content_tag ( :span , label , :class => "search-option btn active btn-primary" ) end end
render a bootstrap button for our search navbar, with appropriate
active status.
render a bootstrap button for our search navbar with appropriate active status .
# the version when this button is 'active', just a span
label
<not_specific>
active_condition
<not_specific>
url_arg
<not_specific>