Sha256: 96898d2876fcdc116a0663bf136b17c7b437c6a567e23d01a710ade683ad62c2

Contents?: true

Size: 290 Bytes

Versions: 7

Compression:

Stored size: 290 Bytes

Contents

module Storytime
  class Blog < Page
    has_many :posts, dependent: :destroy

    def self.seed(site, user)
      blog = site.blogs.new
      blog.title = "Blog"
      blog.slug = "blog"
      blog.published_at = Time.now
      blog.user = user
      blog.save
      blog
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
storytime-2.1.6 app/models/storytime/blog.rb
storytime-2.1.5 app/models/storytime/blog.rb
storytime-2.1.4 app/models/storytime/blog.rb
storytime-2.1.3 app/models/storytime/blog.rb
storytime-2.1.2 app/models/storytime/blog.rb
storytime-2.1.1 app/models/storytime/blog.rb
storytime-2.1.0 app/models/storytime/blog.rb