summaryrefslogtreecommitdiff
path: root/lib/api/helpers.rb
diff options
context:
space:
mode:
authorFelipe Artur <felipefac@gmail.com>2016-05-16 16:43:19 -0300
committerFelipe Artur <felipefac@gmail.com>2016-05-16 16:43:19 -0300
commitc9be74e24797c1dab5b443728349bb0c5ce969c3 (patch)
tree97fbf1bbc482956f64047ef9f1e07611893c2407 /lib/api/helpers.rb
parent93ca5c9964a26fbf31fcc794348b30193f4dff9f (diff)
downloadgitlab-ce-c9be74e24797c1dab5b443728349bb0c5ce969c3.tar.gz
Fix single note api request
Diffstat (limited to 'lib/api/helpers.rb')
-rw-r--r--lib/api/helpers.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/api/helpers.rb b/lib/api/helpers.rb
index 40c967453fb..1003b596aec 100644
--- a/lib/api/helpers.rb
+++ b/lib/api/helpers.rb
@@ -397,5 +397,9 @@ module API
error!(errors[:access_level], 422) if errors[:access_level].any?
not_found!(errors)
end
+
+ def noteable_ability_name(noteable)
+ "read_#{noteable.class.to_s.underscore.downcase}".to_sym
+ end
end
end