Class: HasContent::Record
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- HasContent::Record
- Defined in:
- lib/has_content/record.rb
Instance Method Summary collapse
- #allowed_names ⇒ Object
-
#to_s ⇒ Object
this badboy is here because owner is sometimes not present at validation because content is a has_one on owner, with autosave true.
Instance Method Details
#allowed_names ⇒ Object
20 21 22 |
# File 'lib/has_content/record.rb', line 20 def allowed_names owner.try(:content_names) || [] end |
#to_s ⇒ Object
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 |