I'm getting an error when trying to redirect to the users profile when erasing a tag from a photo. What am I doing wrong? Im getting stuck with this! Thanks!
def destroy
@photo = Photo.find(params[:id])
if @photo.destroy
redirect_to :controller => 'users', :action => 'show', id: @user_id
end
end
@user_id
is missing in your action, if you are using devise, you can passid
of the logged in user by