app/helpers/tab_helper.rb
# Use nav_tab for save controller/action  but different params
Use nav_tab for save controller/action  but different params
Use nav_tab for save controller / action but different params
def nav_tab key, value, &block
    o = {}
    o[:class] = ""
    if value.nil?
      o[:class] << " active" if params[key].blank?
    else
      o[:class] << " active" if params[key] == value
    end
    if block_given?
      content_tag(:li, capture(&block), o)
    else
      content_tag(:li, nil, o)
    end
  end
def nav_tab key , value , & block o = { } o [ :class ] = "" if value . nil? o [ :class ] << " active" if params [ key ] . blank? else o [ :class ] << " active" if params [ key ] == value end if block_given? content_tag ( :li , capture ( & block ) , o ) else content_tag ( :li , nil , o ) end end
Use nav_tab for save controller/action  but different params
Use nav_tab for save controller / action but different params
key
value
block