Sha256: b205381f1c77dddb466f6aee5ff9bd2fc702e6367c5a8913c3fa81eea3eeff42
Contents?: true
Size: 626 Bytes
Versions: 99
Compression:
Stored size: 626 Bytes
Contents
require "edition" require "parted" class ProgrammeEdition < Edition include Parted before_save :setup_default_parts, on: :create @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
99 entries across 99 versions & 1 rubygems