Sha256: 1e329d0966f62e9d6f9f4f292547b1fea61d942615d303bbf08df140486d30c3

Contents?: true

Size: 875 Bytes

Versions: 24

Compression:

Stored size: 875 Bytes

Contents

class Asset < ActiveRecord::Base

  belongs_to :resource, :polymorphic => true

end

class Category < ActiveRecord::Base

  acts_as_list if defined?(ActiveRecord::Acts::List)

  validates_presence_of :name
  has_and_belongs_to_many :posts

  def self.typus
  end

end

class Comment < ActiveRecord::Base

  validates_presence_of :name, :email, :body
  belongs_to :post

end

class CustomUser < ActiveRecord::Base
end

class Page < ActiveRecord::Base

  acts_as_tree if defined?(ActiveRecord::Acts::Tree)

end

class Post < ActiveRecord::Base

  validates_presence_of :title, :body
  has_and_belongs_to_many :categories
  has_many :comments
  has_many :assets, :as => :resource, :dependent => :destroy
  belongs_to :favorite_comment, :class_name => 'Comment'

  def self.status
    %w( true false pending published unpublished )
  end

  def self.typus
    'plugin'
  end

end

Version data entries

24 entries across 24 versions & 2 rubygems

Version Path
fesplugas-typus-0.9.0 test/models.rb
fesplugas-typus-0.9.1 test/models.rb
fesplugas-typus-0.9.10 test/models.rb
fesplugas-typus-0.9.11 test/models.rb
fesplugas-typus-0.9.12 test/models.rb
fesplugas-typus-0.9.13 test/models.rb
fesplugas-typus-0.9.14 test/models.rb
fesplugas-typus-0.9.15 test/models.rb
fesplugas-typus-0.9.16 test/models.rb
fesplugas-typus-0.9.17 test/models.rb
fesplugas-typus-0.9.2 test/models.rb
fesplugas-typus-0.9.3 test/models.rb
fesplugas-typus-0.9.4 test/models.rb
fesplugas-typus-0.9.5 test/models.rb
fesplugas-typus-0.9.6 test/models.rb
fesplugas-typus-0.9.7 test/models.rb
fesplugas-typus-0.9.8 test/models.rb
fesplugas-typus-0.9.9 test/models.rb
typus-0.9.22 test/models.rb
typus-0.9.21 test/models.rb