forked from e621ng/e621ng
fixes #2208
This commit is contained in:
parent
7ab3764d0d
commit
04784dc5d9
@ -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
|
||||
|
@ -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 %>
|
||||
|
Loading…
Reference in New Issue
Block a user