mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +08:00
Convert Post type constants to Enum
This commit is contained in:
parent
897d48b145
commit
c1e40f5d19
6 changed files with 11 additions and 10 deletions
|
@ -320,7 +320,7 @@ class Topic < ActiveRecord::Base
|
|||
def add_moderator_post(user, text, opts={})
|
||||
new_post = nil
|
||||
Topic.transaction do
|
||||
new_post = posts.create(user: user, raw: text, post_type: Post::MODERATOR_ACTION, no_bump: opts[:bump].blank?)
|
||||
new_post = posts.create(user: user, raw: text, post_type: Post.types[:moderator_action], no_bump: opts[:bump].blank?)
|
||||
increment!(:moderator_posts_count)
|
||||
new_post
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue