app/controllers/rocks_controller.rb
#If not authenticated, send back to welcome/home page (Keep user from filling out form and coming back to 
#page later and submitting if they get logged out). Otherwise, create the rock and on to rock/show view.
If not authenticated, send back to welcome/home page (Keep user from filling out form and coming back to
page later and submitting if they get logged out). Otherwise, create the rock and on to rock/show view.
If not authenticated send back to welcome / home page ( Keep user from filling out form and coming back to page later and submitting if they get logged out ) . Otherwise create the rock and on to rock / show view .
def create
        @rock = current_user.rocks.build(rock_params)
        if @rock.valid? && @rock.save                 
            redirect_to rock_path(@rock)
        else
            render :new
        end
    end
def create @rock = current_user . rocks . build ( rock_params ) if @rock . valid? && @rock . save redirect_to rock_path ( @rock ) else render :new end end
If not authenticated, send back to welcome/home page (Keep user from filling out form and coming back to
page later and submitting if they get logged out).
If not authenticated send back to welcome / home page ( Keep user from filling out form and coming back to page later and submitting if they get logged out ) .