Sha256: 32a606c5c6240081670dedc5a59fc79344cc7e6da7d8a657b81bf6b241d3c433
Contents?: true
Size: 352 Bytes
Versions: 4
Compression:
Stored size: 352 Bytes
Contents
class BlogPost < ActiveRecord::Base validates_presence_of :title validates_presence_of :user_id has_many :blog_post_tags belongs_to :merged_into, :class_name => 'BlogPost', :foreign_key => 'merged_into_id' has_many :tags, :through => :blog_post_tags belongs_to :user def published? !published_at.nil? end end
Version data entries
4 entries across 3 versions & 1 rubygems