13 lines
302 B
Ruby
13 lines
302 B
Ruby
# added by fq
|
|
|
|
class JournalReply < ActiveRecord::Base
|
|
attr_accessible :journal_id, :reply_id, :user_id
|
|
|
|
belongs_to :user
|
|
belongs_to :journal
|
|
|
|
def self.add_reply(journal_id, reply_id, user_id)
|
|
self.create(:journal_id => journal_id, :reply_id => reply_id, :user_id => user_id)
|
|
end
|
|
end
|