Class: Pulitzer::PostType
Instance Attribute Summary collapse
Class Method Summary
collapse
Instance Method Summary
collapse
assoc_name, attrs_name, convert_hash_to_nested, convert_nested_assoc
Instance Attribute Details
#import_json ⇒ Object
Returns the value of attribute import_json.
14
15
16
|
# File 'app/models/pulitzer/post_type.rb', line 14
def import_json
@import_json
end
|
Class Method Details
.named(label) ⇒ Object
16
17
18
|
# File 'app/models/pulitzer/post_type.rb', line 16
def self.named(label)
self.find_by(name: label)
end
|
Instance Method Details
#most_recent_published_post_type_version ⇒ Object
24
25
26
|
# File 'app/models/pulitzer/post_type.rb', line 24
def most_recent_published_post_type_version
post_type_versions&.published&.order(version_number: :desc)&.first
end
|
#published_type_version_id ⇒ Object
20
21
22
|
# File 'app/models/pulitzer/post_type.rb', line 20
def published_type_version_id
published_type_version&.id
end
|