socialforge/app/models/journal_reply.rb

13 lines
302 B
Ruby
Raw Normal View History

# 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