Sha256: f4eff8220a42e12e7d0420d2e4dfcaa18debf7f01933acb5f57007fb7dbd0778

Contents?: true

Size: 389 Bytes

Versions: 1

Compression:

Stored size: 389 Bytes

Contents

class Comment < ActiveRecord::Base
  # Example implentation of choo_choo
  # here comment is tracked as a child node of Activity
  # and its parent (ParentNode) is set to Post.
  # Hence, each change to this model will be tracked to its beloning post parent
  include ChooChoo::ChildNode
  attr_accessible :body, :user, :post

  set_parent :post

  belongs_to :user
  belongs_to :post
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
choo_choo-0.0.1 spec/dummy/app/models/comment.rb