We are creating an app with CRUD function as an exercise using rails.
As a simple explanation, the CRUD function is implemented without using scaffold.
Therefore, the following errors are displayed and clogged.
I would be pleased if you could find someone who knows.
In addition, we will add if there is insufficient information.

Error message
NameError: undefined local variable or method `params' for UsersController: Class
Applicable source code


# frozen_string_literal: true
class UsersController


# frozen_string_literal: true
class ListsController
Supplemental information (FW/tool version etc.)

ruby ​​-v 2.6.4
rails -v 5.2.3

  • Answer # 1

    It must be written in the method, not directly under the class.

    class UsersController