diff options
author | skv <skv-headless@yandex.ru> | 2014-01-19 22:55:59 +0400 |
---|---|---|
committer | skv <skv-headless@yandex.ru> | 2014-01-19 23:39:56 +0400 |
commit | a3f645ef51ec12ce93934b4ddb11313613d8c451 (patch) | |
tree | f30e76940e436049aa83a8c60741bc6c2d9b7f44 /db | |
parent | 3fe578a7fdaea8607cf98ffb1878c03fd5ac3649 (diff) | |
download | gitlab-ce-a3f645ef51ec12ce93934b4ddb11313613d8c451.tar.gz |
Remove deprecated finders
Diffstat (limited to 'db')
-rw-r--r-- | db/fixtures/development/04_project.rb | 2 | ||||
-rw-r--r-- | db/migrate/20130506095501_remove_project_id_from_key.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/db/fixtures/development/04_project.rb b/db/fixtures/development/04_project.rb index 6fdb163c27d..990575306c3 100644 --- a/db/fixtures/development/04_project.rb +++ b/db/fixtures/development/04_project.rb @@ -19,7 +19,7 @@ project_urls = [ project_urls.each_with_index do |url, i| group_path, project_path = url.split('/')[-2..-1] - group = Group.find_by_path(group_path) + group = Group.find_by(path: group_path) unless group group = Group.new( diff --git a/db/migrate/20130506095501_remove_project_id_from_key.rb b/db/migrate/20130506095501_remove_project_id_from_key.rb index 4214fd45d14..6b794cfb5c1 100644 --- a/db/migrate/20130506095501_remove_project_id_from_key.rb +++ b/db/migrate/20130506095501_remove_project_id_from_key.rb @@ -4,7 +4,7 @@ class RemoveProjectIdFromKey < ActiveRecord::Migration Key.where('project_id IS NOT NULL').update_all(type: 'DeployKey') DeployKey.all.each do |key| - project = Project.find_by_id(key.project_id) + project = Project.find_by(id: key.project_id) if project project.deploy_keys << key print '.' |