Sha256: a146f28d000f1c8458c15b2ca580e26d17988b28e4a3f18a5e4403ea90666ac2
Contents?: true
Size: 649 Bytes
Versions: 19
Compression:
Stored size: 649 Bytes
Contents
require "edition" require "parted" class ProgrammeEdition < Edition include Parted before_save :setup_default_parts, on: :create GOVSPEAK_FIELDS = [] @fields_to_clone = [] DEFAULT_PARTS = [ {title: "Overview", slug: "overview"}, {title: "What you'll get", slug: "what-youll-get"}, {title: "Eligibility", slug: "eligibility"}, {title: "How to claim", slug: "how-to-claim"}, {title: "Further information", slug: "further-information"}, ] def setup_default_parts if parts.empty? DEFAULT_PARTS.each { |part| parts.build(title: part[:title], slug: part[:slug], body: "") } end end end
Version data entries
19 entries across 19 versions & 1 rubygems