Archived
fix locked? being called on nil
This commit is contained in:
@@ -84,7 +84,7 @@ class ForumthreadsController < ApplicationController
|
|||||||
|
|
||||||
def thread_params(add = [])
|
def thread_params(add = [])
|
||||||
a = [:title, :content]
|
a = [:title, :content]
|
||||||
a << :label_id unless @thread.locked?
|
a << :label_id if @thread && !@thread.locked?
|
||||||
a += add
|
a += add
|
||||||
params.require(:forumthread).permit(a)
|
params.require(:forumthread).permit(a)
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user