Sha256: 56ed032ed456f3669f759ed753f8cd9d1ac8181a826f9c06bcf0c99eaa468fe1

Contents?: true

Size: 411 Bytes

Versions: 16

Compression:

Stored size: 411 Bytes

Contents

class Post < ActiveRecord::Base

  validates_presence_of :title, :body
  has_and_belongs_to_many :categories
  has_many :assets, :as => :resource, :dependent => :destroy
  has_many :comments
  has_many :views

  belongs_to :favorite_comment, :class_name => "Comment"
  belongs_to :typus_user

  STATUS = %w( pending published unpublished )

  def self.typus
    "plugin"
  end

  def asset_file_name
  end

end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
typus-3.0.2 test/fixtures/rails_app/app/models/post.rb
typus-3.0.1 test/fixtures/rails_app/app/models/post.rb
typus-3.0.0 test/fixtures/rails_app/app/models/post.rb
typus-1.0.0.pre13 test/fixtures/rails_app/app/models/post.rb
typus-1.0.0.pre12 test/fixtures/rails_app/app/models/post.rb
typus-1.0.0.pre11 test/fixtures/rails_app/app/models/post.rb
typus-1.0.0.pre10 test/fixtures/rails_app/app/models/post.rb
typus-1.0.0.pre9 test/fixtures/rails_app/app/models/post.rb
typus-1.0.0.pre8 test/fixtures/rails_app/app/models/post.rb
typus-1.0.0.pre7 test/fixtures/rails_app/app/models/post.rb
typus-1.0.0.pre6 test/fixtures/rails_app/app/models/post.rb
typus-1.0.0.pre5 test/fixtures/rails_app/app/models/post.rb
typus-1.0.0.pre4 test/fixtures/rails_app/app/models/post.rb
typus-1.0.0.pre3 test/fixtures/rails_app/app/models/post.rb
typus-1.0.0.pre2 test/fixtures/rails_app/app/models/post.rb
typus-1.0.0.pre test/fixtures/rails_app/app/models/post.rb