Class: Postablr::Entry
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Postablr::Entry
show all
- Includes:
- ArPublish
- Defined in:
- app/models/postablr/entry.rb
Defined Under Namespace
Classes: Audio, Image, Link, Post, Quote, Video
Instance Method Summary
collapse
Methods included from ArPublish
#expired?, #fill_default_publish, #publish, #publish!, #publish_by_default, #published?, #unpublish, #unpublish!, #upcoming?, #validate_publish_date_consistency
Instance Method Details
#categories_list ⇒ Object
21
22
23
|
# File 'app/models/postablr/entry.rb', line 21
def categories_list
categories.map(&:name).join(", ")
end
|
#defaults ⇒ Object
25
26
27
28
|
# File 'app/models/postablr/entry.rb', line 25
def defaults
return unless new_record?
self. = true
end
|
#postable_name ⇒ Object
31
32
33
|
# File 'app/models/postablr/entry.rb', line 31
def postable_name
postable.class.table_name.split("_")[2].singularize
end
|