diff options
Diffstat (limited to 'db/post_migrate/20200602143020_update_routes_for_lost_and_found_group_and_orphaned_projects.rb')
-rw-r--r-- | db/post_migrate/20200602143020_update_routes_for_lost_and_found_group_and_orphaned_projects.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/db/post_migrate/20200602143020_update_routes_for_lost_and_found_group_and_orphaned_projects.rb b/db/post_migrate/20200602143020_update_routes_for_lost_and_found_group_and_orphaned_projects.rb index faa3c4161a0..2b036a8da80 100644 --- a/db/post_migrate/20200602143020_update_routes_for_lost_and_found_group_and_orphaned_projects.rb +++ b/db/post_migrate/20200602143020_update_routes_for_lost_and_found_group_and_orphaned_projects.rb @@ -25,11 +25,11 @@ class UpdateRoutesForLostAndFoundGroupAndOrphanedProjects < ActiveRecord::Migrat # There should only be one Group owned by the Ghost user starting with 'lost-and-found' Group .joins('INNER JOIN members ON namespaces.id = members.source_id') - .where('namespaces.type = ?', 'Group') - .where('members.type = ?', 'GroupMember') - .where('members.source_type = ?', 'Namespace') - .where('members.user_id = ?', self.id) - .where('members.access_level = ?', ACCESS_LEVEL_OWNER) + .where(namespaces: { type: 'Group' }) + .where(members: { type: 'GroupMember' }) + .where(members: { source_type: 'Namespace' }) + .where(members: { user_id: self.id }) + .where(members: { access_level: ACCESS_LEVEL_OWNER }) .find_by(Group.arel_table[:name].matches("#{LOST_AND_FOUND_GROUP}%")) end |