diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-01-30 10:40:14 +0000 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-01-30 10:40:14 +0000 |
commit | 15641879c3196f228ccd77d3731c0710ee1c55cf (patch) | |
tree | 1ee6fb5299c99c1b2d64195d0fffdb7af2d656e6 /lib/api | |
parent | 7e348ca2260ae422ecc333dbb8b81dfcc6e78fbf (diff) | |
parent | e415a84d8faa9c317d34be68a9a2f4c0fc36981c (diff) | |
download | gitlab-ci-15641879c3196f228ccd77d3731c0710ee1c55cf.tar.gz |
Merge branch 'pgolm-fix/deprecations' into 'master'
Fix deprecations
Ported from https://github.com/gitlabhq/gitlab-ci/pull/357
Diffstat (limited to 'lib/api')
-rw-r--r-- | lib/api/builds.rb | 2 | ||||
-rw-r--r-- | lib/api/projects.rb | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/api/builds.rb b/lib/api/builds.rb index 45b2d35..6ecc248 100644 --- a/lib/api/builds.rb +++ b/lib/api/builds.rb @@ -14,7 +14,7 @@ module API required_attributes! [:token] ActiveRecord::Base.transaction do - builds = Build.scoped + builds = Build.all builds = builds.where(project_id: current_runner.projects) unless current_runner.shared? build = builds.first_pending diff --git a/lib/api/projects.rb b/lib/api/projects.rb index f2334a5..dad783f 100644 --- a/lib/api/projects.rb +++ b/lib/api/projects.rb @@ -12,7 +12,7 @@ module API gitlab_projects = Project.from_gitlab(current_user, nil, nil, :authorized) ids = gitlab_projects.map { |project| project.id } - projects = Project.where("gitlab_id IN (?)", ids).all + projects = Project.where("gitlab_id IN (?)", ids).load present projects, with: Entities::Project end @@ -24,7 +24,7 @@ module API gitlab_projects = Project.from_gitlab(current_user, nil, nil, :owned) ids = gitlab_projects.map { |project| project.id } - projects = Project.where("gitlab_id IN (?)", ids).all + projects = Project.where("gitlab_id IN (?)", ids).load present projects, with: Entities::Project end |