app/controllers/rocks_controller.rb
#If not authenticated, send back to welcome/home page. Otherwise, delete the rock and head to rocks/index view.
If not authenticated, send back to welcome/home page. Otherwise, delete the rock and head to rocks/index view.
If not authenticated send back to welcome / home page . Otherwise delete the rock and head to rocks / index view .
def destroy
        @rock = Rock.find(params[:id])
        if @rock.user == current_user
            @rock.delete
            redirect_to collection_path(@rock.user)
        end
    end
def destroy @rock = Rock . find ( params [ :id ] ) if @rock . user == current_user @rock . delete redirect_to collection_path ( @rock . user ) end end
If not authenticated, send back to welcome/home page.
If not authenticated send back to welcome / home page .