Sha256: 23ed01b6253fe6374313088d2aa38b7048ef13c1ed6aef5767419089b913b399

Contents?: true

Size: 287 Bytes

Versions: 1

Compression:

Stored size: 287 Bytes

Contents

class Comment < ActiveRecord::Base
  has_merit

  belongs_to :user

  attr_accessible :name, :comment, :user_id, :votes

  validates :name, :comment, :user_id, :presence => true

  delegate :comments, :to => :user, :prefix => true

  def friend
    User.find_by_name('friend')
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
merit-1.5.0 test/dummy/app/models/comment.rb