Open Err0rZero opened 7 years ago
先登录,用seed.rb里的账号密码
登陆了,还是显示没有权限
在每个app/controllers/xx_controller.rb
中,通过before_action来判断当前用户是否存在(已登录),若未登录成功,则不会让其抓取,强制返回主页,你看是不是这里出了问题,你这边可以取消这个限制
class HospitalsController < ApplicationController
before_action :login, only: [:ajax]
...
private
def login
if current_user.nil?
redirect_to root_path, flash: {:warning => "只有管理员能进行此操作喔"}
end
end
end
NoMethodError (undefined method buses_houses' for nil:NilClass): app/controllers/buses_controller.rb:10:in
ajax'
房屋的坐标整合没
抓取周边信息,提取没有权限,这是为何?