Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #685 from travis-ci/sf-fix-profile-missing-owner
fix the profile page when the url contains an owner that is not availabl...
  • Loading branch information
svenfuchs committed Aug 28, 2012
2 parents 789b81f + af55b17 commit d77ff8c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/controllers/profiles_controller.rb
Expand Up @@ -8,6 +8,7 @@ class ProfilesController < ApplicationController
before_filter :authenticate_user!
before_filter :first_sync, :only => :show
before_filter :verify_tab
before_filter :verify_owner

responders :json
respond_to :json
Expand Down Expand Up @@ -55,6 +56,10 @@ def verify_tab
params[:tab] ||= tabs.first
end

def verify_owner
not_found unless owner
end

def tabs
@tabs ||= %w(repos profile).select { |tab| display_tab?(tab) }
end
Expand Down

0 comments on commit d77ff8c

Please sign in to comment.