解决用户页面跳转404
This commit is contained in:
parent
df93c78490
commit
836fe0b9a3
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue