Correct test for notes opened by inactive users
This commit is contained in:
parent
49dfae87ab
commit
cb51f46a4f
1 changed files with 1 additions and 1 deletions
|
@ -43,7 +43,7 @@ class NotesController < ApplicationController
|
||||||
|
|
||||||
@note_includes_anonymous = @note.author.nil? || @note_comments.find { |comment| comment.author.nil? }
|
@note_includes_anonymous = @note.author.nil? || @note_comments.find { |comment| comment.author.nil? }
|
||||||
|
|
||||||
@note_comments = @note_comments.drop(1) unless !@note.author.nil? && @note.author.status == "deleted"
|
@note_comments = @note_comments.drop(1) if @note.author.nil? || @note.author.active?
|
||||||
rescue ActiveRecord::RecordNotFound
|
rescue ActiveRecord::RecordNotFound
|
||||||
render :template => "browse/not_found", :status => :not_found
|
render :template => "browse/not_found", :status => :not_found
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue