def active_page?(pages = {})
      is_active = pages.include?(params[:controller])
      is_active = pages[params[:controller]].include?(params[:action]) if is_active && !pages[params[:controller]].empty?
      is_active
    end
def active_page?(pages = {})
      is_active = pages.include?(params[:controller])
      is_active = pages[params[:controller]].include?(params[:action]) if is_active && !pages[params[:controller]].empty?
      is_active
    end
Takes a hash with pages and tells whether the current page is among them.
 The keys must be controller names and their value must be an array of
 action names. If the array is empty, every action is supposed to be valid.