NoMethodError in _Controller #_ private method `_' called for の原因について

状況

Userクラスのtestメソッドを呼び出したときにこのエラーに遭遇

class User < ApplicationRecord
 ...

end


  def test
    ...
  end

f:id:shiness:20210120142650p:plain

原因

endの位置がおかしかった

以下のように修正することで解決!

class User < ApplicationRecord
 ...


  def test
    ...
  end
 end