- content_for :title do
  Search result for: #{params[:q]}

.col-sm-12
  %ul.nav.nav-tabs
    %li.active
      = link_to "#projects", "data-toggle"=>"tab" do
        Projects
        = "(#{@projects.length})"
    %li
      = link_to "#users", "data-toggle"=>"tab" do
        People
        = "(#{@users.length})"

  .tab-content
    .tab-pane.active#projects
      - unless @projects.empty?
        %table.table#project_table
          %thead
          - @projects.each_with_index do |project, index|
            %tr
              %td{:class => "#{project.aasm_state}"}
                = render :partial => "projects/list_item", :locals => {:project => project, :index => index }
      - else
        %h4 No projects found
    .tab-pane#users
      - unless @users.empty?
        - @users.each do |user|
          %table.table#users_table
            - @users.each do |user|
              %tr
                - user_class = "busy"
                - if user.projects.empty?
                  - user_class = "free"
                %td{:class => user_class }
                  = link_to user_path(user) do
                    = image_tag(user.gravatar_url(:size => "24"), :class => "img-thumbnail", :title => "#{user.name}", :alt => user.name)
                    = user.name
      - else
        %h4 No users found

- content_for :title do
  Search result for: #{params[:q]}

.col-sm-12
  %ul.nav.nav-tabs
    %li.active
      = link_to "#projects", "data-toggle"=>"tab" do
        Projects
        = "(#{@projects.length})"
    %li
      = link_to "#users", "data-toggle"=>"tab" do
        People
        = "(#{@users.length})"

  .tab-content
    .tab-pane.active#projects
      - unless @projects.empty?
        %table.table#project_table
          %thead
          - @projects.each_with_index do |project, index|
            %tr
              %td{:class => "#{project.aasm_state}"}
                = render :partial => "projects/list_item", :locals => {:project => project, :index => index }
      - else
        %h4 No projects found
    .tab-pane#users
      - unless @users.empty?
        %table.table#users_table
          - @users.each do |user|
            %tr
              - user_class = "busy"
              - if user.projects.empty?
                - user_class = "free"
              %td{:class => user_class }
                = link_to user_path(user) do
                  = image_tag(user.gravatar_url(:size => "24"), :class => "img-thumbnail", :title => "#{user.name}", :alt => user.name)
                  = user.name
      - else
        %h4 No users found

Fix double rendering of the user results
Fix double rendering of the user results
