app/helpers/application_helper.rb
# The current 'search area' of the app as determined by current page:
# :catalog, :reserves, :login, :user, :articles
# we add later to :articles
#
# Can return nil if no recognized search area.


Can return nil if no recognized search area.
Can return nil if no recognized search area .
def current_search_area(p = params)
    if p[:controller] == "catalog" || p[:controller] == "advanced"
      return :catalog
    elsif p[:controller] == "reserves"
      return :reserves
    elsif p[:controller] == "users"
      return :user
    elsif p[:controller] == "user_sessions"
      return :login
    else
      return nil
    end
  end
def current_search_area ( p = params ) if p [ :controller ] == "catalog" || p [ :controller ] == "advanced" return :catalog elsif p [ :controller ] == "reserves" return :reserves elsif p [ :controller ] == "users" return :user elsif p [ :controller ] == "user_sessions" return :login else return nil end end
The current 'search area' of the app as determined by current page:
:catalog, :reserves, :login, :user, :articles
we add later to :articles
The current ' search area ' of the app as determined by current page : : catalog : reserves : login : user : articles we add later to : articles
p
<not_specific>
params
<not_specific>