Class: TagSet

Inherits:
ApplicationRecord show all
Includes:
CommunityRelated
Defined in:
/var/apps/qpixel/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



14
15
16
# File '/var/apps/qpixel/app/models/tag_set.rb', line 14

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

.metaObject



10
11
12
# File '/var/apps/qpixel/app/models/tag_set.rb', line 10

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

Instance Method Details

#with_paths(no_excerpt = false) ⇒ Object



18
19
20
21
22
23
24
# File '/var/apps/qpixel/app/models/tag_set.rb', line 18

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