Created
March 1, 2012 23:21
-
-
Save alkema/1953965 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Comment < ActiveRecord::Base | |
default_scope :order => 'created_at DESC' | |
belongs_to :marked_entry | |
belongs_to :user | |
has_many :participants, :through => :marked_entry | |
def self.reply_copy | |
'## Reply above this line in order to comment via email ##' | |
end | |
def participants_attributes=(attributes) | |
attributes.each{ |a| | |
atts = a.last | |
Participant.create(atts) unless atts[:email].blank? | |
} | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment