Class: TagSet

Inherits:
ApplicationRecord show all
Includes:
CommunityRelated
Defined in:
app/models/tag_set.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from ApplicationRecord

#attributes_print, fuzzy_search, match_search, #match_search, sanitize_for_search, sanitize_name, sanitize_sql_in, useful_err_msg, with_lax_group_rules

Class Method Details

.mainObject



13
14
15
# File 'app/models/tag_set.rb', line 13

def self.main
  where(name: 'Main').first
end

.metaObject



9
10
11
# File 'app/models/tag_set.rb', line 9

def self.meta
  where(name: 'Meta').first
end

Instance Method Details

#with_paths(no_excerpt = false) ⇒ Object



17
18
19
20
21
22
23
# File 'app/models/tag_set.rb', line 17

def with_paths(no_excerpt = false)
  if no_excerpt
    tags_with_paths.where(excerpt: ['', nil])
  else
    tags_with_paths
  end
end