```ruby
 class PicksController < ApplicationController
  
   def new
     @pick = Pick.new
     @user = User.new
   end

   def create
     @user = User.find_or_create_by(params[:user])
     @pick = Pick.new(params[:pick])
     if @pick.save 
       @user.picks << @pick
       render text: 'good'
     else
       render text: 'faild'
     end
   end

 end
```

Add user creation and pick creation logic to pick controller
user
```ruby
 class PicksController < ApplicationController
  
   def new
     @pick = Pick.new
   end

   def create
     @user = User.find_by(email: params[:pick][:email])
     if !@user
        @user = User.create(email: params[:pick][:email])
     end
     @pick = Pick.new(pick_params)
     if @pick.save 
       @user.picks << @pick
       if params[:commit]=="signup"
         render new_user_path, locals: {email: params[:email]}
       else
         redirect_to root_path
       end
     else
       render text: 'faild'
     end
   end

   private

    def pick_params
      params.require(:pick).permit(:number, :game, :draw_date, :multiplier)
    end
 end
```
assistant