diff --git a/Gemfile.lock b/Gemfile.lock index a8435533b..5303d023a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -16,6 +16,7 @@ GIT GEM remote: http://gemcutter.org/ + remote: https://rubygems.org/ specs: actionmailer (4.1.0) actionpack (= 4.1.0) @@ -139,6 +140,7 @@ GEM rack (1.5.2) rack-test (0.6.2) rack (>= 1.0) + radix62 (1.0.1) rails (4.1.0) actionmailer (= 4.1.0) actionpack (= 4.1.0) @@ -193,6 +195,7 @@ GEM activesupport (>= 3.0) sprockets (~> 2.8) statistics2 (0.54) + streamio-ffmpeg (1.0.0) term-ansicolor (1.3.0) tins (~> 1.0) therubyracer (0.12.1) @@ -256,6 +259,7 @@ DEPENDENCIES pg protected_attributes pry + radix62 (~> 1.0.1) rails (~> 4.1.0) rmagick ruby-imagespec! @@ -267,6 +271,7 @@ DEPENDENCIES simplecov sprockets-rails statistics2 + streamio-ffmpeg term-ansicolor therubyracer timecop diff --git a/app/models/bulk_update_request.rb b/app/models/bulk_update_request.rb index b78db9970..5fddeeb26 100644 --- a/app/models/bulk_update_request.rb +++ b/app/models/bulk_update_request.rb @@ -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 diff --git a/app/views/bulk_update_requests/_form.html.erb b/app/views/bulk_update_requests/_form.html.erb index 8b3df56d7..f0bf7a328 100644 --- a/app/views/bulk_update_requests/_form.html.erb +++ b/app/views/bulk_update_requests/_form.html.erb @@ -20,6 +20,7 @@ mass update aaa -> bbb <%= dtext_field "bulk_update_request", "reason", :name => "Reason" %> + <%= f.input :forum_topic_id, :hint => " (optional)" %> <%= f.button :submit, :value => "Submit" %> <%= dtext_preview_button "bulk_update_request", "reason" %> <% end %>