andrewculver / koudoku

Robust subscription support for Rails with Stripe.
MIT License
1.16k stars 187 forks source link

Templates can't resolve routing paths. #159

Closed preston closed 8 years ago

preston commented 8 years ago

I've following the README and my app generally works fine. When rendering a koudoku-provided template (such as at pricing_path etc) and the temple calls back to my application view template, my own view templates can't resolve routes that are clearly defined in routes.rb and working properly on my own views. Even "root_path" can't be resolved. For example:

NameError at /users/3/subscriptions
undefined local variable or method `root_path' for #<#<Class:0x007f96c2426228>:0x007f96bad47698>
Did you mean?  font_path

This has to be something dumb. What's going on?

preston commented 8 years ago

Nevermind, I figured it out. I didn't realize that any templates rendered by callbacks need to have paths prefixed with "main_app."