解决用户页面跳转404

This commit is contained in:
nieguanghui 2013-08-06 22:23:22 +08:00
parent df93c78490
commit 836fe0b9a3
1 changed files with 3 additions and 2 deletions

View File

@ -164,9 +164,10 @@ class UsersController < ApplicationController
end
@events_by_day = events.group_by(&:event_date)
#Modified by nie
unless User.current.admin?
if !@user.active? || (@user != User.current && @memberships.empty? && events.empty?)
if !@user.active? #|| (@user != User.current && @memberships.empty? && events.empty?)
# redirect_to home_path
render_404
return
end