Sha256: b33c5d5ae861a2d788f1f9956a6563d91970725bb896a87e32ca890c55bf82be
Contents?: true
Size: 658 Bytes
Versions: 13
Compression:
Stored size: 658 Bytes
Contents
class Post < ActiveRecord::Base ## # Constants # STATUS = { "Draft" => "draft", "Published" => "published", "Unpublished" => "unpublished", "<div class=''>Something special</div>".html_safe => "special" } ARRAY_SELECTOR = %w(item1 item2) ARRAY_HASH_SELECTOR = [["Draft", "draft"], ["Custom Status", "custom"]] ## # Validations # validates :body, :presence => true validates :title, :presence => true ## # Associations # belongs_to :favorite_comment, :class_name => "Comment" belongs_to :typus_user has_and_belongs_to_many :categories has_many :comments has_many :views end
Version data entries
13 entries across 13 versions & 1 rubygems