Module: GrpcAuth::ApplicationOnly
- Defined in:
- app/helpers/grpc_auth/application_helper.rb
Instance Method Summary collapse
Instance Method Details
#need_login ⇒ Object
11 12 13 14 15 16 |
# File 'app/helpers/grpc_auth/application_helper.rb', line 11 def need_login unless is_login? flash[:alert] = "你还没有登录" redirect_to grpc_auth.login_path and return end end |
#pageit ⇒ Object
18 19 20 21 22 |
# File 'app/helpers/grpc_auth/application_helper.rb', line 18 def pageit params[:page] ||= 1 per_page = 10 @num=per_page*(params[:page].to_i-1) end |