Sha256: 63b27aad981a573df9120ec9009dd2daf3393348ad603f583967ea20c526e0bb

Contents?: true

Size: 754 Bytes

Versions: 2

Compression:

Stored size: 754 Bytes

Contents

class Topic < ActiveRecord::Base
  has_many :posts
end

class Post < ActiveRecord::Base
  belongs_to :topic
  belongs_to :author, :class_name => 'User'
  has_one :post_config
  has_many :comments
  has_and_belongs_to_many :tags

  amoeba do
    enable
    prepend :title => "Copy of "
    append :contents => " (copied version)"
    regex :contents => {:replace => /dog/, :with => 'cat'}
  end
end

class PostConfig < ActiveRecord::Base
  belongs_to :post
end

class Comment < ActiveRecord::Base
  belongs_to :post
  has_many :ratings

  amoeba do
    enable
  end
end

class Rating < ActiveRecord::Base
  belongs_to :comment
end

class Tag < ActiveRecord::Base
  has_and_belongs_to_many :posts
end

class User < ActiveRecord::Base
  has_many :posts
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
amoeba-0.0.2 spec/support/models.rb
amoeba-0.0.1 spec/support/models.rb