Guest User

Untitled

a guest
Apr 25th, 2018
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. def create
  2. @client = Client.find(params[:client_id])
  3. @client_user = ClientUser.new(params[:client])
  4. @user = User.new(params[:user])
  5. #how do I save all that and have any hope of getting any sort of sensible errors back to the new form if it goes tids up?
  6. respond_to do |format|
  7. flash[:notice] = "User successfully created"
  8. format.html{redirect_to client_path(@client)}
  9. else
  10. format.html{render :action => 'new'}
  11. end
  12. end
  13. end
  14. end
Add Comment
Please, Sign In to add comment