Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-06-13 21:21:48 +0400
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-06-13 21:21:48 +0400
commiteb7845682d3e9f66694ce6a5a97765fda898a4d2 (patch)
tree967807c7372063899dcb6cd554426a7bb3d75119 /app/models/ability.rb
parent2af8ace1dc49e5ff59be01c2063139a3244b9cee (diff)
Improve files/snippets action buttons
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/models/ability.rb')
-rw-r--r--app/models/ability.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/models/ability.rb b/app/models/ability.rb
index c60aa2d622e..234578b5e18 100644
--- a/app/models/ability.rb
+++ b/app/models/ability.rb
@@ -236,7 +236,11 @@ class Ability
:"modify_#{name}",
]
else
- subject.respond_to?(:project) ? project_abilities(user, subject.project) : []
+ if subject.respond_to?(:project)
+ project_abilities(user, subject.project)
+ else
+ []
+ end
end
end
end