app/models/user/posting.rb
def reply(topic, body)
    topic.posts.build(:body => body).tap do |post|
      post.site  = topic.site
      post.forum = topic.forum
      post.user  = self
      post.save
    end
  end
# Creates new topic and post.
# Only..
#  - sets sticky/locked bits if you're a moderator or admin 
#  - changes forum_id if you're an admin
#
Creates new topic and post.
Only
sets sticky/locked bits if you're a moderator or admin
changes forum_id if you're an admin
Creates new topic and post . Only sets sticky / locked bits if you ' re a moderator or admin changes forum_id if you ' re an admin
def reply(topic, body)
    topic.posts.build(:body => body).tap do |post|
      post.site  = topic.site
      post.forum = topic.forum
      post.user  = self
      post.save
    end
  end
def reply ( topic , body ) topic . posts . build ( :body => body ) . tap do | post | post . site = topic . site post . forum = topic . forum post . user = self post . save end end
Creates new topic and post.
Creates new topic and post .
topic
body