public
Created

  • Download Gist
users_controller.rb
Ruby
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
class UsersController < ApplicationController
def new
@user = User.new
end
def create
@user = User.new(params[:user])
if @user.save
flash[:notice] = "You signed up successfully"
flash[:color]= "valid"
else
flash[:notice] = "Form is invalid"
flash[:color]= "invalid"
end
render "new"
end
end

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.