fixes #2208
This commit is contained in:
@@ -39,8 +39,10 @@ class BulkUpdateRequest < ActiveRecord::Base
|
||||
end
|
||||
|
||||
def create_forum_topic
|
||||
forum_topic = ForumTopic.create(:title => "[bulk] #{title}", :category_id => 1, :original_post_attributes => {:body => reason_with_link})
|
||||
update_attribute(:forum_topic_id, forum_topic.id)
|
||||
unless forum_topic_id
|
||||
forum_topic = ForumTopic.create(:title => "[bulk] #{title}", :category_id => 1, :original_post_attributes => {:body => reason_with_link})
|
||||
update_attribute(:forum_topic_id, forum_topic.id)
|
||||
end
|
||||
end
|
||||
|
||||
def reason_with_link
|
||||
|
||||
@@ -20,6 +20,7 @@ mass update aaa -> bbb
|
||||
<%= dtext_field "bulk_update_request", "reason", :name => "Reason" %>
|
||||
</div>
|
||||
|
||||
<%= f.input :forum_topic_id, :hint => " (optional)" %>
|
||||
<%= f.button :submit, :value => "Submit" %>
|
||||
<%= dtext_preview_button "bulk_update_request", "reason" %>
|
||||
<% end %>
|
||||
|
||||
Reference in New Issue
Block a user