Red Rose Software
# Where code meets humans
We are passionate software crafters dedicated to helping our clients achieve their goals quickly and efficiently. With a focus on quality and agility, we build solutions that drive success.
users_controller.rb
application_controller.rb
class UsersController < ApplicationController
def create
@user = User.new(user_params)
if @user.save
flash[:notice] = "User created successfully!"
redirect_to @user
else
flash.now[:alert] = "There was an error creating the user."
render :new
end
end
private
def user_params
params.require(:user).permit(:username, :email, :password)
end
end