Skip to content

Commit

Permalink
Fix rubocop issue
Browse files Browse the repository at this point in the history
  • Loading branch information
phawk committed Sep 10, 2015
1 parent 4e65801 commit 298d567
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 1 addition & 3 deletions app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@ def url_after_denied_access_when_signed_out
end

def ensure_team!
unless current_team
redirect_to root_url(host: request.domain)
end
redirect_to root_url(host: request.domain) unless current_team
end

def current_team
Expand Down
4 changes: 2 additions & 2 deletions app/models/ability.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ def initialize(team_user)
can :assign_roles, User

# Can edit users below their role
can :update, User do |user|
user.team_users.find_by!(team_id: team_user.team_id).role.in? team_user.assignable_roles[0...-1]
can :update, User do |u|
u.team_users.find_by!(team_id: team_user.team_id).role.in? team_user.assignable_roles[0...-1]
end
end

Expand Down

0 comments on commit 298d567

Please sign in to comment.