From 42b41a268b622cd58206920afd9176f5c263d2d0 Mon Sep 17 00:00:00 2001 From: pixeldesu <git@pixelde.su> Date: Tue, 5 May 2015 18:09:26 +0200 Subject: [PATCH] fix not shown ban reason --- app/controllers/application_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index e178da33..beed49fb 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -2,7 +2,7 @@ class ApplicationController < ActionController::Base # Prevent CSRF attacks by raising an exception. # For APIs, you may want to use :null_session instead. protect_from_forgery with: :exception - + before_filter :configure_permitted_parameters, if: :devise_controller? before_filter :banned? @@ -12,7 +12,7 @@ class ApplicationController < ActionController::Base name = current_user.screen_name # obligatory '2001: A Space Odyssey' reference flash[:notice] = "I'm sorry, #{name}, I'm afraid I can't do that." - if current_user.ban_reason.nil? + unless current_user.ban_reason.nil? flash[:notice] += "\nBan reason: #{current_user.ban_reason}" end if not current_user.permanently_banned?