app/models/user/posting.rb
def revise_topic(topic, attributes, is_moderator)
      topic.title = attributes[:title] if attributes.key?(:title)
      topic.sticky, topic.locked, topic.forum_id = attributes[:sticky], attributes[:locked], attributes[:forum_id] if is_moderator
      topic.save
    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 revise_topic(topic, attributes, is_moderator)
      topic.title = attributes[:title] if attributes.key?(:title)
      topic.sticky, topic.locked, topic.forum_id = attributes[:sticky], attributes[:locked], attributes[:forum_id] if is_moderator
      topic.save
    end
def revise_topic ( topic , attributes , is_moderator ) topic . title = attributes [ :title ] if attributes . key? ( :title ) topic . sticky , topic . locked , topic . forum_id = attributes [ :sticky ] , attributes [ :locked ] , attributes [ :forum_id ] if is_moderator topic . save end
Creates new topic and post.
Creates new topic and post .
topic
attributes
is_moderator