diff options
author | Nihad Abbasov <narkoz.2008@gmail.com> | 2012-07-25 13:18:30 +0400 |
---|---|---|
committer | Nihad Abbasov <narkoz.2008@gmail.com> | 2012-07-25 13:18:30 +0400 |
commit | 1b95c8bff351f6718ec31ac1de1e48c57bc95d44 (patch) | |
tree | ed06aacfa6dbaece68089b289cbfca07d8dbd43c /lib | |
parent | 92d98f5a0c28bffd7b070cda190b07ab72667d58 (diff) |
API: ability to get project by id
Diffstat (limited to 'lib')
-rw-r--r-- | lib/api/helpers.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/api/helpers.rb b/lib/api/helpers.rb index e7b9a417b08..4dfe35f49ef 100644 --- a/lib/api/helpers.rb +++ b/lib/api/helpers.rb @@ -5,7 +5,8 @@ module Gitlab end def user_project - @project ||= current_user.projects.find_by_code(params[:id]) + @project ||= current_user.projects.find_by_id(params[:id]) || + current_user.projects.find_by_code(params[:id]) end def authenticate! |