0
Michael Hartl 자습서를 따르고 있는데 문제가 발견되어 해결 방법을 모르지만 ... 내 문제는 here whitout ajax입니다.정의되지 않은 메소드`[] 'for nil : NilClass
나는이있어 내가 다른 사용자에 따라 수행하려고 할 때 내가 가진
여기NoMethodError (undefined method `[]' for nil:NilClass):
app/controllers/follows_controller.rb:4:in `create'
이 (모델 RSpec에)를
before_filter :authenticate_user!
def create
@user = User.find(params[:follows][:followed_id])
current_user.follow!(@user)
redirect_to @user
end
def destroy
@user = Follow.find(params[:id]).followed
current_user.unfollow!(@user)
redirect_to @user
end
나머지 관계 컨트롤러 EQ를 내 "를 다음"된다 같은 더 많은 코드가 필요하면 감사합니다.
감사합니다. 나는 그것을 조사해 보았는데 잘못된 매개 변수를 발견했습니다. – BlackSan