Advertisement
Guest User

Untitled

a guest
Feb 27th, 2015
189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. class UsersController < ApplicationController
  2. def new
  3. @user = User.new
  4. end
  5. def create
  6. @user = User.new(params[:user])
  7. if @user.save
  8. flash[:notice] = "You signed up successfully"
  9. flash[:color]= "valid"
  10. else
  11. flash[:notice] = "Form is invalid"
  12. flash[:color]= "invalid"
  13. end
  14. render "new"
  15. end
  16. end
  17.  
  18. Rails.application.routes.draw do
  19. get 'users/new'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement