app/models/user/posting.rb
# 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 revise(record, attributes)
    is_moderator = moderator_of?(record.forum)
    return unless record.editable_by?(self, is_moderator)
    case record
      when Topic then revise_topic(record, attributes, is_moderator)
      when Post  then post.save
      else raise "Invalid record to revise: #{record.class.name.inspect}"
    end
    record
  end
def revise ( record , attributes ) is_moderator = moderator_of? ( record . forum ) return unless record . editable_by? ( self , is_moderator ) case record when Topic then revise_topic ( record , attributes , is_moderator ) when Post then post . save else raise "Invalid record to revise: #{record.class.name.inspect}" end record end
Creates new topic and post.
Creates new topic and post .
record
attributes