开发者

Strange rails 3 application behaviour

I have the following code in my application controller

  config = Configuration.first
  admin_user = User.where(:admin => true)

  def has_admin
    admin_user.eql? nil
  end

  def has_configuration
    config.eql? nil
  end

The has_config method works, the has_admin method does not work. Kind of frustrating as it se开发者_如何学运维ems like if one of the methods works then the other one should as well. Does anyone have any ideas?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜