diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2017-02-03 11:23:21 +0000 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2017-02-03 11:23:21 +0000 |
commit | 7dc8b6b2045d84ff232731ef92f2cac916732753 (patch) | |
tree | 6ab9df705d3c3383b081f31952a98ba58957bcc3 /app/models/project.rb | |
parent | 25bb39225e073c451d76e7a7ddb9dedef8d43143 (diff) | |
parent | a0586dbc165cc09422412149712a218938137308 (diff) | |
download | gitlab-ce-7dc8b6b2045d84ff232731ef92f2cac916732753.tar.gz |
Merge branch 'fwn-to-find-by-full-path' into 'master'
replace `find_with_namespace` with `find_by_full_path`
See merge request !8949
Diffstat (limited to 'app/models/project.rb')
-rw-r--r-- | app/models/project.rb | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/app/models/project.rb b/app/models/project.rb index 37f4705adbd..0d286bfbaa8 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -370,10 +370,6 @@ class Project < ActiveRecord::Base def group_ids joins(:namespace).where(namespaces: { type: 'Group' }).select(:namespace_id) end - - # Add alias for Routable method for compatibility with old code. - # In future all calls `find_with_namespace` should be replaced with `find_by_full_path` - alias_method :find_with_namespace, :find_by_full_path end def lfs_enabled? @@ -1352,6 +1348,6 @@ class Project < ActiveRecord::Base def pending_delete_twin return false unless path - Project.unscoped.where(pending_delete: true).find_with_namespace(path_with_namespace) + Project.unscoped.where(pending_delete: true).find_by_full_path(path_with_namespace) end end |