Did you implement the create action? The action 'create' could not be found for UsersController


#1

class UsersController < ApplicationController
  def new
    @user = User.new
  end
end
def create
 
  @user =
    User.new() 
  if @user.save 
    session[:user_id] =
      @user.id 
    redirect_to '/' 
  else 
    redirect_to '/signup' 
  end 
end

private
def user_params
  
  params.require(:user).permit(
    :first_name, :last_name,
    :email, :password)
end

Why won't this work??
This is the error I get use def create: Did you implement the create action? The action 'create' could not be found for UsersController


5. Signup II - Step 2 Issue
#2

Try and put your whole create method inside of your UsersController class. As far as I can see, currently the create method is outside of the UsersController class e.g. you close the UsersController class before you make your definition (lines 5 and 6).