app/controllers/rocks_controller.rb
#If not authenticated, send back to welcome/home page. Otherwise, find rock make sure the user is the 
#owner of the rock - if not redirect to welcome, if so - on to edit view.
If not authenticated, send back to welcome/home page. Otherwise, find rock make sure the user is the
owner of the rock - if not redirect to welcome, if so - on to edit view.
If not authenticated send back to welcome / home page . Otherwise find rock make sure the user is the owner of the rock - if not redirect to welcome if so - on to edit view .
def edit
        @rock = Rock.find(params[:id])
        if @rock.user != current_user
            redirect_to root_path
        end
    end
def edit @rock = Rock . find ( params [ :id ] ) if @rock . user != current_user redirect_to root_path end end
If not authenticated, send back to welcome/home page.
If not authenticated send back to welcome / home page .