Skip to content

Commit 04784dc

Browse files
committed
1 parent 7ab3764 commit 04784dc

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

Gemfile.lock

+5
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ GIT
1616

1717
GEM
1818
remote: http://gemcutter.org/
19+
remote: https://rubygems.org/
1920
specs:
2021
actionmailer (4.1.0)
2122
actionpack (= 4.1.0)
@@ -139,6 +140,7 @@ GEM
139140
rack (1.5.2)
140141
rack-test (0.6.2)
141142
rack (>= 1.0)
143+
radix62 (1.0.1)
142144
rails (4.1.0)
143145
actionmailer (= 4.1.0)
144146
actionpack (= 4.1.0)
@@ -193,6 +195,7 @@ GEM
193195
activesupport (>= 3.0)
194196
sprockets (~> 2.8)
195197
statistics2 (0.54)
198+
streamio-ffmpeg (1.0.0)
196199
term-ansicolor (1.3.0)
197200
tins (~> 1.0)
198201
therubyracer (0.12.1)
@@ -256,6 +259,7 @@ DEPENDENCIES
256259
pg
257260
protected_attributes
258261
pry
262+
radix62 (~> 1.0.1)
259263
rails (~> 4.1.0)
260264
rmagick
261265
ruby-imagespec!
@@ -267,6 +271,7 @@ DEPENDENCIES
267271
simplecov
268272
sprockets-rails
269273
statistics2
274+
streamio-ffmpeg
270275
term-ansicolor
271276
therubyracer
272277
timecop

app/models/bulk_update_request.rb

+4-2
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,10 @@ def editable?(user)
3939
end
4040

4141
def create_forum_topic
42-
forum_topic = ForumTopic.create(:title => "[bulk] #{title}", :category_id => 1, :original_post_attributes => {:body => reason_with_link})
43-
update_attribute(:forum_topic_id, forum_topic.id)
42+
unless forum_topic_id
43+
forum_topic = ForumTopic.create(:title => "[bulk] #{title}", :category_id => 1, :original_post_attributes => {:body => reason_with_link})
44+
update_attribute(:forum_topic_id, forum_topic.id)
45+
end
4446
end
4547

4648
def reason_with_link

app/views/bulk_update_requests/_form.html.erb

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ mass update aaa -> bbb
2020
<%= dtext_field "bulk_update_request", "reason", :name => "Reason" %>
2121
</div>
2222

23+
<%= f.input :forum_topic_id, :hint => " (optional)" %>
2324
<%= f.button :submit, :value => "Submit" %>
2425
<%= dtext_preview_button "bulk_update_request", "reason" %>
2526
<% end %>

0 commit comments

Comments
 (0)