Skip to content

Instantly share code, notes, and snippets.

@ojiry
Created March 6, 2012 09:32
Show Gist options
  • Save ojiry/1985299 to your computer and use it in GitHub Desktop.
Save ojiry/1985299 to your computer and use it in GitHub Desktop.
def new
if params[:user]
@user = User.new(params[:user])
render @user.valid? ? :confirm : :new
else
@user = User.new
respond_to do |format|
format.html # new.html.erb
format.json { render json: @user }
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment