Skip to content

Instantly share code, notes, and snippets.

@kelhusseiny
Created April 20, 2012 04:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kelhusseiny/2426049 to your computer and use it in GitHub Desktop.
Save kelhusseiny/2426049 to your computer and use it in GitHub Desktop.
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment