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