阅读背景:

ActionView :: Template :: Error:未定义的方法`is_admin'代表nil:NilClass

来源:互联网 

I am using ruby 2.2/Rails 4.2 and active record on Heroku. I am getting this error on my heroku production server only. Everything works fine on my dev machine. is_admin is a boolean field I added to my Devise user table, and is checked when a logged in user tries to load a page in the admin section. If they are not an admin they get kicked to the main app page. The strange thing is that its the login page that gives this error, and is_admin shouldn't be getting called unless a) the user is logged in (Im not) and b) the user tried to load an admin page (I did not). I am using ruby 2.2/Rails 4.2 and active record




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: