Sha256: 3444f98a4243bcb9b74d871bb76f6617eae26741f796419094265d38254fae1b
Contents?: true
Size: 625 Bytes
Versions: 43
Compression:
Stored size: 625 Bytes
Contents
require "edition" require "parted" class ProgrammeEdition < Edition include Parted before_save :setup_default_parts, on: :create GOVSPEAK_FIELDS = [] 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
43 entries across 43 versions & 1 rubygems