diff options
author | Peter Golm <golm.peter@gmail.com> | 2014-01-09 14:25:29 +0100 |
---|---|---|
committer | Peter Golm <golm.peter@gmail.com> | 2014-01-09 14:25:29 +0100 |
commit | 4eef64bb9a1a7be4d71ba65475e1078f762e62fb (patch) | |
tree | 7682e31d8eb9035f5c000f7dfac6c8b71d8e702c /lib | |
parent | 1f838a4f98fafa80ae5cfd7759b883b00870072f (diff) | |
download | gitlab-ci-4eef64bb9a1a7be4d71ba65475e1078f762e62fb.tar.gz |
fix deprections warnings
Diffstat (limited to 'lib')
-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 0982d7d..811de7c 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 |