Class: Dhatu::MetaTag

Inherits:
ApplicationRecord show all
Includes:
Publishable
Defined in:
app/models/dhatu/meta_tag.rb

Constant Summary collapse

META_TYPES =

Constants

["Default", "Open Graph", "Twitter", "Facebook", "Other"]

Instance Method Summary collapse

Instance Method Details

#can_be_deleted?Boolean

Returns:

  • (Boolean)


44
45
46
# File 'app/models/dhatu/meta_tag.rb', line 44

def can_be_deleted?
  status?(:removed)
end

#can_be_edited?Boolean

Permission Methods


Returns:

  • (Boolean)


40
41
42
# File 'app/models/dhatu/meta_tag.rb', line 40

def can_be_edited?
  status?(:published) or status?(:unpublished)
end

#display_nameObject

Generic Methods




33
34
35
# File 'app/models/dhatu/meta_tag.rb', line 33

def display_name
  "#{self.meta_type_was} - #{self.meta_key_was}"
end