Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class ArtistsController < ApplicationController
- def index
- end
- def show
- end
- def new
- @artist = Artist.new
- end
- def create
- logout_keeping_session!
- @artist = Artist.new(params[:artist])
- @artist.register! if @artist && @artist.valid?
- success = @artist && @artist.valid?
- if success && @artist.errors.empty?
- redirect_back_or_default('/')
- flash[:notice] = "Thanks for signing up! We're sending you an email with your activation code."
- else
- flash[:error] = "We couldn't set up that account, sorry."
- render :action => "new"
- end
- end
- end
Add Comment
Please, Sign In to add comment