Use boolean comparators where it makes sense

This commit is contained in:
wvengen 2015-01-14 21:15:08 +01:00
parent dbdc7ae4aa
commit 118886344a
28 changed files with 60 additions and 60 deletions

View file

@ -10,7 +10,7 @@ class MessagesController < ApplicationController
# Creates a new message object.
def new
@message = Message.new(params[:message])
if @message.reply_to and not @message.reply_to.is_readable_for?(current_user)
if @message.reply_to && !@message.reply_to.is_readable_for?(current_user)
redirect_to new_message_url, alert: 'Nachricht ist privat!'
end
end