app/helpers/users_helper.rb
# user_nav_link is used in users/show nav links - up to 9 links in up to 3 sections
# nav links is displayed in 1, 2 or 3 lines in users/show page depending on screen width
# prefix must match prefix for entries in users/user_nav_links in locals
user_nav_link is used in users/show nav links - up to 9 links in up to 3 sections
nav links is displayed in 1, 2 or 3 lines in users/show page depending on screen width
prefix must match prefix for entries in users/user_nav_links in locals
user_nav_link is used in users / show nav links - up to 9 links in up to 3 sections nav links is displayed in 1 2 or 3 lines in users / show page depending on screen width prefix must match prefix for entries in users / user_nav_links in locals
def user_nav_link (options)
    logger.debug2  "users_helper.user_nav_link: input options = #{options}"
    prefix = options.delete(:prefix)
    symbol = case prefix
               when 'tabs' then :tab
               when 'deal_status' then :status
               when 'deal_direction' then :direction
               else
                 logger.debug2  "error in users/_user_nav_links. user_nav_link must be called with prefix tabs, deal_status or deal_direction"
             end
    page_values = options.delete(:page_values)
    page_value = page_values[symbol]
    array_value = options.delete(:array_value)
    raise "found :array_values" if options.has_key?(:array_values) 
    if array_value == page_value
      t ".#{prefix}_#{page_value}"
    else
      options = page_values.clone
      options[:id] = @user2.id
      options[symbol] = array_value
      key = ".#{prefix}_#{array_value}"
      logger.debug2  "link key = #{key}, link options = #{options}"
      link_to (t key), user_path(options)
    end
  end
def user_nav_link ( options ) logger . debug2 "users_helper.user_nav_link: input options = #{options}" prefix = options . delete ( :prefix ) symbol = case prefix when 'tabs' then :tab when 'deal_status' then :status when 'deal_direction' then :direction else logger . debug2 "error in users/_user_nav_links. user_nav_link must be called with prefix tabs, deal_status or deal_direction" end page_values = options . delete ( :page_values ) page_value = page_values [ symbol ] array_value = options . delete ( :array_value ) raise "found :array_values" if options . has_key? ( :array_values ) if array_value == page_value t ".#{prefix}_#{page_value}" else options = page_values . clone options [ :id ] = @user2 . id options [ symbol ] = array_value key = ".#{prefix}_#{array_value}" logger . debug2 "link key = #{key}, link options = #{options}" link_to ( t key ) , user_path ( options ) end end
user_nav_link is used in users/show nav links - up to 9 links in up to 3 sections
nav links is displayed in 1, 2 or 3 lines in users/show page depending on screen width
prefix must match prefix for entries in users/user_nav_links in locals
user_nav_link is used in users / show nav links - up to 9 links in up to 3 sections nav links is displayed in 1 2 or 3 lines in users / show page depending on screen width prefix must match prefix for entries in users / user_nav_links in locals
# options.delete(:array_values) # only :array_value is in options hash # todo: remove # inactive link - current tab or current filter value # active link - link to new tab or new filter value
options
<not_specific>