Paulo Amosse Cuambe

Joined

1,610 Experience
16 Lessons Completed
0 Questions Solved

Activity

As of now, June 10th 2022, the error message does not show. I had to add status: :unprocessable_entity in order for the error to show.

    def create
        @user = User.new(user_params)

        if @user.save
            redirect_to root_path, notice: "Successfully created account"
        else
            render :new, status: :unprocessable_entity
        end
    end

Screencast tutorials to help you learn Ruby on Rails, Javascript, Hotwire, Turbo, Stimulus.js, PostgreSQL, MySQL, Ubuntu, and more.

© 2024 GoRails, LLC. All rights reserved.