Guest User

Untitled

a guest
May 25th, 2018
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. class ArtistsController < ApplicationController
  2. def index
  3.  
  4. end
  5.  
  6. def show
  7.  
  8. end
  9.  
  10. def new
  11. @artist = Artist.new
  12. end
  13.  
  14. def create
  15. logout_keeping_session!
  16. @artist = Artist.new(params[:artist])
  17. @artist.register! if @artist && @artist.valid?
  18. success = @artist && @artist.valid?
  19. if success && @artist.errors.empty?
  20. redirect_back_or_default('/')
  21. flash[:notice] = "Thanks for signing up! We're sending you an email with your activation code."
  22. else
  23. flash[:error] = "We couldn't set up that account, sorry."
  24. render :action => "new"
  25. end
  26. end
  27. end
Add Comment
Please, Sign In to add comment