31 lines
1.1 KiB
Ruby
31 lines
1.1 KiB
Ruby
class SampleProject < Project
|
|
after_initialize do |record|
|
|
# Set default values for any required attributes which are missing
|
|
record.attributes = default_attrs.update(record.attributes.compact)
|
|
|
|
# Add sample appearance release record(s)
|
|
appearance_releases << sample_appearance_releases
|
|
end
|
|
|
|
private
|
|
|
|
def default_attrs
|
|
{
|
|
name: "America's Greatest TV Show",
|
|
client_name: "Greatest Network",
|
|
producer_name: "Greatest Production Company LLC",
|
|
producer_address: "111 Awesome Street, City, State Zipcode",
|
|
description: "In this show about food, customers try food dishes and offer testimonials about the flavors and quality of the dish they are eating.",
|
|
details: "There are no additional risks associated with this production.",
|
|
sample: true,
|
|
}
|
|
end
|
|
|
|
def sample_appearance_releases
|
|
[
|
|
SampleAppearanceRelease.new(person_first_name: "Jane", person_last_name: "Doe"),
|
|
SampleAppearanceRelease.new(person_first_name: "Jane", person_last_name: "Doe"),
|
|
]
|
|
end
|
|
end
|