2014-01-14 1 views
2

레일 n00b 여기에. 난 레일 4 애플 리케이션에 Koudoku 보석 (스트라이프와 함께 구독 결제를 추가하는 좋은 방법 인 것 같다)을 통합하려고하는 중입니다; 나는 사용자가 소유하고있는 목록을 가지고 있지만 각 목록은 자체 구독을 가지고 있습니다. 따라서 사용자가 많은 목록을 가지고 있지만 목록은 하나의 가입Koudoku - 사용자, 레일 4 소유의 목록에 대한 구독입니다.

https://github.com/andrewculver/koudoku의 추가 정보 지침에 따라가, 나 레일을 실행 g koudoku : 나는에 3 개 가격 계획을로드

(사용자 대 명부에 부착) 목록을 설치

NoMethodError in Koudoku::SubscriptionsController#index 
undefined method `subscription' for #<User:0x007fc61f79ecc0> 

의 I : 내 스트라이프 계정과 레일 애플 리케이션

I, 그것은 다음과 같은 오류를 던지고 가격 페이지 (main_app.pricing_path)로 이동하려고 시도에 API 키를로드 구독 컨트롤러의 ndex 작업은 다음과 같습니다.

def index 

    # don't bother showing the index if they've already got a subscription. 
    if current_owner and current_owner.subscription.present? 
    redirect_to koudoku.edit_owner_subscription_path(current_owner, current_owner.subscription) 
    end 

    # Load all plans. 
    @plans = ::Plan.order(:display_order).all 

    # Don't prep a subscription unless a user is authenticated. 
    unless no_owner? 
    # we should also set the owner of the subscription here. 
    @subscription = ::Subscription.new({Koudoku.owner_id_sym => @owner.id}) 
    # e.g. @subscription.user = @owner 
    @subscription.send Koudoku.owner_assignment_sym, @owner 
    end 

end 

내가 잘못 가고있는 곳의 아이디어는 무엇입니까? 누구나이 보석을 사용하는 초보자 가이드를 통해 실행? 감사!

+0

이 작업을 수행 했습니까? – Abram

답변

0

귀하의 문제는 사용자가 아닌 목록에 설치하는 것 같습니다. 나는 그 일을 행운이 없었다.

사용자에게 사용해보고 도움이되는지 확인하십시오.

2

레일 4가 경로를 설치하는 방식에 문제가 있습니다. 계류중인 풀 요청이있는 것 같습니다. https://github.com/andrewculver/koudoku/issues/53

+0

FIXED : https://github.com/andrewculver/koudoku/issues/53 ==> https://github.com/andrewculver/koudoku/pull/54 –