Sha256: ab6debdf76c8c496c420d53d1b121cf56869af555e96cbb8bd9d06e1f9f1b0f0
Contents?: true
Size: 613 Bytes
Versions: 24
Compression:
Stored size: 613 Bytes
Contents
# configuration options for this briefcase config do set(:models_path => Pathname(__FILE__).parent.join("models")) end # define a Post model define("Post") do # the post model will have YAML frontmatter # with values for 'status' and 'date' meta do status date DateTime, :default => lambda {|post, attr| post.document.created_at } end # the post model will have a 'title' method which returns the text # from the first h1 heading content do title "h1" has_many :subheadings, "h2" end actions do def publish(options={}) puts "The publish action" end end end
Version data entries
24 entries across 24 versions & 1 rubygems