Sha256: 7cc47d33da191de1c5e88b3f9712a77224fdee7bb80263637e6fc4ed8168db66

Contents?: true

Size: 904 Bytes

Versions: 7

Compression:

Stored size: 904 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

  def asset_file_name
  end

end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
typus-0.9.29 test/models.rb
typus-0.9.28 test/models.rb
typus-0.9.27 test/models.rb
typus-0.9.26 test/models.rb
typus-0.9.25 test/models.rb
typus-0.9.24 test/models.rb
typus-0.9.23 test/models.rb