[Rails Tutorial] "NoMethodError (undefined method` activation_digest ='for # <User: 0x00000003156938>

"NoMethodError (undefined method `activation_digest=' for #User:0x00000003156938

about

For some reason I saw this error only in the production environment

user.rb

    def activate
      self.update_attribute(:activated,    true)
      self.update_attribute(:activated_at, Time.zone.now)
    end

I forgot to add self.

Why was there no problem if it was local?

Recommended Posts

[Rails Tutorial] "NoMethodError (undefined method` activation_digest ='for # <User: 0x00000003156938>
[Ruby on Rails] NoMethodError undefined method `devise_for'error resolution
About the relationship between Rails credentials.yml.enc and master.key (undefined method `[]'for nil: NilClass (NoMethodError))
NoMethodError: undefined method `setup'for Devise: Module
rails tutorial chapter 10 summary (for self-learning)
[Ruby on Rails] NoMethodError: undefined method `t'for # <ActiveRecord :: Migration: 〇〇〇〇> Dealing with errors
[Rails] Unit test code for User model
Testing for Error Messages: Rails Tutorial Notes-Chapter 7
[Rails] Method summary for conversion / verification / search
rails tutorial
rails tutorial
rails tutorial
rails tutorial
rails tutorial
rails tutorial
rails method
rails tutorial
Rails error undefined method ʻimage_name'for nil: NilClass handling