Sha256: a1ccee96d282e8e9f3e2a8570a0c6a5a9eee1cc471a0386f2e216242a3e2e8ab

Contents?: true

Size: 263 Bytes

Versions: 3

Compression:

Stored size: 263 Bytes

Contents

class Post < ActiveRecord::Base
  include Sunrise::Models::Post
  
  has_many :comments, :as => :commentable, :dependent => :delete_all
  
  attr_accessible :published_at, :content, :title
  
  scope :recently, order("#{quoted_table_name}.published_at DESC")
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
sunrise-posts-0.1.5 lib/generators/sunrise/posts/templates/post.rb
sunrise-posts-0.1.4 lib/generators/sunrise/posts/templates/post.rb
sunrise-posts-0.1.3 lib/generators/sunrise/posts/templates/post.rb