Class: HasContent::Record

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
lib/has_content/record.rb

Instance Method Summary collapse

Instance Method Details

#allowed_namesObject



20
21
22
# File 'lib/has_content/record.rb', line 20

def allowed_names
  owner.try(:content_names) || []
end

#to_sObject

this badboy is here because owner is sometimes not present at validation because content is a has_one on owner, with autosave true



16
17
18
# File 'lib/has_content/record.rb', line 16

def to_s
  content
end