开发者

Strange rails 3 application behaviour

开发者 https://www.devze.com 2023-02-23 01:48 出处:网络
I have the following code in my application controller config = Configuration.first admin_user = User.where(:admin => true)

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

精彩评论

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