app/helpers/app_frame/scopes_helper.rb
def scope_link(scope = nil)
    if scope
      as = scope[:as]
      name = as.to_s.humanize
    else
      as = nil
      name = "All"
    end
    
    link = current_filter_scopes.dup
    
    if as
      unless scope[:default]
        link[as] = true 
        default_scopes.each { |dn, ds| link[ds[:as]] = false }
      end

      active = current_boolean_scopes.keys.include?(as)
    else
      active = current_boolean_scopes.empty?
    end
    
#    name = "#{name}: #{scope_count(scope)}"
    
    content_tag(:li, link_to(name, link), :class => active ? 'active' : nil)
  end
# create a link to a scope (or no scopes), wrapped in a list item
create a link to a scope (or no scopes), wrapped in a list item
create a link to a scope ( or no scopes ) wrapped in a list item
def scope_link(scope = nil)
    if scope
      as = scope[:as]
      name = as.to_s.humanize
    else
      as = nil
      name = "All"
    end
    link = current_filter_scopes.dup
    if as
      unless scope[:default]
        link[as] = true 
        default_scopes.each { |dn, ds| link[ds[:as]] = false }
      end
      active = current_boolean_scopes.keys.include?(as)
    else
      active = current_boolean_scopes.empty?
    end
    content_tag(:li, link_to(name, link), :class => active ? 'active' : nil)
  end
def scope_link ( scope = nil ) if scope as = scope [ :as ] name = as . to_s . humanize else as = nil name = "All" end link = current_filter_scopes . dup if as unless scope [ :default ] link [ as ] = true default_scopes . each { | dn , ds | link [ ds [ :as ] ] = false } end active = current_boolean_scopes . keys . include? ( as ) else active = current_boolean_scopes . empty? end content_tag ( :li , link_to ( name , link ) , :class => active ? 'active' : nil ) end
create a link to a scope (or no scopes), wrapped in a list item
create a link to a scope ( or no scopes ) wrapped in a list item
#    name = "#{name}: #{scope_count(scope)}"
scope