title: Can you help me understand why this boolean method is returning false?
body: <p>I have a User model with an account_type attribute that is either "Student" or "Partner". I have created boolean methods in my User model to determine if a user record is either a student or partner (see below). </p>
  
  <pre><code> def student?
      self.account_type == "Student"
    end
  
    def partner?
      self.account_type == "Partner"
    end
  </code></pre>
  
  <p>In rails console, when I set user equal to an instance of User that has a student account type and enter user.account_type == "Student", I get true but when I call user.student?, I get false. Is there an issue with how I've set up these methods? They seem pretty straight forward so I'm not following why true isn't returned for the record.</p>
  
  <p>Console Output:</p>
  
  <pre><code>user = User.last
  #&lt;User id: 18, first_name: "gjalrgkj", last_name: "kgjrlgakjrl", email: "terajglrkj@gmail.com", password_digest: "$2a$10$WF.Rw3PzlWilH0X.Nbfxfe5aB18WW6J7Rt4SAKQEwI8...", remember_digest: nil, activation_digest: "$2a$10$/bXG4/nKCiiZHWailUPAmOZj7YhCjKhPm4lUW6nPC3N...", activated: nil, activated_at: nil, reset_digest: nil, reset_sent_at: nil, account_type: "Student", created_at: "2018-07-02 04:21:07", updated_at: "2018-07-02 04:21:07"&gt;
  &gt;&gt; user.account_type
  =&gt; "Student"
  &gt;&gt; user.account_type = "Student"
  =&gt; "Student"
  &gt;&gt; user.student?
  =&gt; false
  </code></pre>
  
  <p>User Model:</p>
  
  <pre><code>class User &lt; ApplicationRecord
    has_one :personal_information
  
    attr_accessor :remember_token, :activation_token, :reset_token
    before_save   :downcase_email
    before_create :create_activation_digest
    validates :first_name,  presence: true, length: { maximum: 50 }
    validates :last_name,  presence: true, length: { maximum: 50 }
    VALID_EMAIL_REGEX = /\A[\w+\-.]+@[a-z\d\-]+(\.[a-z\d\-]+)*\.[a-z]+\z/i
    validates :email, presence: true, length: { maximum: 255 },
                        format: { with: VALID_EMAIL_REGEX },
                        uniqueness: { case_sensitive: false }
    has_secure_password
    validates :password, presence: true, length: { minimum: 6 }, allow_nil: true
    validates :account_type, presence: true
  
  
    def User.new_token
      SecureRandom.urlsafe_base64
    end
  
    def User.digest(string)
      cost = ActiveModel::SecurePassword.min_cost  BCrypt::Engine::MIN_COST :
                                                BCrypt::Engine.cost
      BCrypt::Password.create(string, cost: cost)
    end
  
    def create_reset_digest   
      self.reset_token = User.new_token
      update_columns(reset_digest: User.digest(reset_token), reset_sent_at: Time.zone.now)
    end
  
    def authenticated?(attribute, token)
      return false if digest.nil?
   BCrypt::Password.new(digest).is_password?(token)
    end
  
  
    def remember
      self.remember_token = User.new_token
      update_attribute(:remember_digest, User.digest(remember_token))
    end
  
    def forget
      update_attribute(:remember_digest, nil)
    end
  
  
    def provide_age
      now = Time.now.utc.to_date
      if self.birthday.nil?
        nil
      else
        self.age = now.year - self.birthday.year - ((now.month &gt; self.birthday.month || (now.month == self.birthday.month &amp;&amp; now.day &gt;= self.birthday.day)) ? 0 : 1)
        update_attribute(:age, self.age)
      end
    end
  
  
    def send_activation_email
      UserMailer.account_activation(self).deliver_now
    end  
  
    def activate
      update_columns(activated: true, activated_at: Time.zone.now)
    end
  
    def send_password_reset_email
      UserMailer.password_reset(self).deliver_now
    end
  
    def password_reset_expired?
      reset_sent_at &lt; 2.hours.ago
    end
  
  
    private 
  
    def downcase_email
      self.email.downcase!
    end
  
    def create_activation_digest
      self.activation_token  = User.new_token
      self.activation_digest = User.digest(activation_token)
    end
  end
  </code></pre>
  
  <p>User Helper</p>
  
  <pre><code>  def account_type
      [
        ['Student'], 
        ['Partner'], 
        ['School Administrator'], 
        ['Philanthropist']
      ]
    end
  
    def student?
      self.account_type == "Student"
    end
  
    def partner?
      self.account_type == "Partner"
    end
   end
  </code></pre>