Show date with year in message to banned users who try to log in

This commit is contained in:
Neil Lalonde
2013-06-30 12:49:34 -04:00
parent 023d18cab2
commit c1a39b5a30
2 changed files with 2 additions and 1 deletions

View File

@ -30,7 +30,7 @@ class SessionController < ApplicationController
if @user.confirm_password?(params[:password])
if @user.is_banned?
render json: { error: I18n.t("login.banned", {date: I18n.l(@user.banned_till, format: :short_no_year)}) }
render json: { error: I18n.t("login.banned", {date: I18n.l(@user.banned_till, format: :date_only)}) }
return
end