I는 모듈이 :정의되지 않은 방법, 이유는 무엇입니까?
class Store < ActiveRecord::Base
include Room::Chair
def self.get_available_chair(user)
my_chair=get_chair_type(user) # error: undefined method 'get_chair_type'
end
end
: 다음
module Room::Chair
def get_chair_type(user)
..
end
end
를, I는 Room::Chair
모듈에서 'get_chair_type'방법을 호출하는 클래스 메소드 'self.get_available_chair'에 클래스가
나는 include Room::Chair
을 가지고 있지만 오류가 발생했습니다 정의되지 않은 메서드 'get_chair_type (user)' 왜?