diff options
Diffstat (limited to 'app/models/namespace.rb')
-rw-r--r-- | app/models/namespace.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/app/models/namespace.rb b/app/models/namespace.rb index 8116f7a256f..90b4be7a674 100644 --- a/app/models/namespace.rb +++ b/app/models/namespace.rb @@ -100,11 +100,11 @@ class Namespace < ApplicationRecord # Searches for namespaces matching the given query. # - # This method uses ILIKE on PostgreSQL and LIKE on MySQL. + # This method uses ILIKE on PostgreSQL. # - # query - The search query as a String + # query - The search query as a String. # - # Returns an ActiveRecord::Relation + # Returns an ActiveRecord::Relation. def search(query) fuzzy_search(query, [:name, :path]) end @@ -277,7 +277,7 @@ class Namespace < ApplicationRecord end def has_parent? - parent.present? + parent_id.present? || parent.present? end def root_ancestor |