diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 02d23e174..0a1775c5c 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -31,7 +31,7 @@ class UsersController < ApplicationController accept_api_auth :index, :show, :create, :update, :destroy,:tag_save #william - before_filter :require_login,:only => :tag_save + before_filter :need_login,:only => :tag_save helper :sort diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 789861fad..75484a227 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -1317,8 +1317,8 @@ module ApplicationHelper # end #added by william - def get_fans_num(user) - user.watcher_users.count + def need_login + redirect_to signin_path end #end end diff --git a/app/views/users/index.html.erb b/app/views/users/index.html.erb index 0bf0642dd..d82d3dc9d 100644 --- a/app/views/users/index.html.erb +++ b/app/views/users/index.html.erb @@ -87,8 +87,7 @@