4
"위하여"를 했어야 매처 (matcher) "have_many"4 구문 :
it {should have_many(:items).order(:position)}
레일은 내 사용자 모델을위한 레일 4 확인을
has_many :items, -> { order(:position) }
나는 다음과 같은 했어야 정규 작동 할 것으로 예상
그러나이 오류가 발생합니다 : Expected User to have a has_many association called items (items should be ordered by position)
는 TES 내 구문이 잘못인가를 티?
감사합니다. 그것이 문제였습니다. –
@MichaelvanHolst [accept] (http://meta.stackexchange.com/questions/5234/how-does-accepting-an-answer-work) 올바른 경우 답변 – gotva
@MichaelvanHolst @MichaelvanHolst 님이 답변을 수락하면 다른 사용자 이것 좀 봐? –