We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0e9c34f commit e1db744Copy full SHA for e1db744
1 file changed
lib/topic_creator.rb
@@ -16,7 +16,7 @@ def create
16
topic_params = setup
17
@topic = Topic.new(topic_params)
18
19
- setup_auto_close_time if @opts[:auto_close_time]
+ setup_auto_close_time if @opts[:auto_close_time].present?
20
21
process_private_message if @opts[:archetype] == Archetype.private_message
22
save_topic
@@ -47,7 +47,6 @@ def setup
47
else
48
Category.where(name: @opts[:category]).first
49
end
50
-
51
@guardian.ensure_can_create!(Topic,category)
52
topic_params[:category_id] = category.id if category.present?
53
topic_params[:meta_data] = @opts[:meta_data] if @opts[:meta_data].present?
0 commit comments