From eb7892ebe4316c1a68c2d0ee5f9d2b8468ece28d Mon Sep 17 00:00:00 2001 From: jomo Date: Sat, 17 Jan 2015 21:12:10 +0100 Subject: [PATCH] fix users not being able to create in write-only forums --- app/controllers/forumthreads_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/forumthreads_controller.rb b/app/controllers/forumthreads_controller.rb index 675f907..668ac9e 100644 --- a/app/controllers/forumthreads_controller.rb +++ b/app/controllers/forumthreads_controller.rb @@ -23,7 +23,7 @@ class ForumthreadsController < ApplicationController def create @thread = Forumthread.new(mod? ? thread_params([:sticky, :locked, :forum_id]) : thread_params([:forum_id])) - if @thread.can_write?(current_user) + if @thread.forum.can_write?(current_user) @thread.user_author = current_user if @thread.save @thread.send_new_mention_mail