Skip to content
This repository has been archived by the owner on Jul 15, 2020. It is now read-only.

undefined local variable or method `piggybak_coupons' #6

Open
airjoshb opened this issue Jun 25, 2014 · 3 comments
Open

undefined local variable or method `piggybak_coupons' #6

airjoshb opened this issue Jun 25, 2014 · 3 comments

Comments

@airjoshb
Copy link

The gem has been added, the js added, the migrations done. I can create coupons, but get the error when I add <%= render "piggybak_coupons/apply_coupon" %> to piggybak/orders/submit.html.erb. Any help would be appreciated.

@stephskardal
Copy link
Contributor

Can you specify what error you are seeing here? Is it an asset related error, or something else?

@airjoshb
Copy link
Author

Sorry, the error is in the subject line. I get,

undefined local variable or method `piggybak_coupons'

on,

var coupon_lookup = "<%= piggybak_coupons.apply_coupon_url %>";

@stephskardal
Copy link
Contributor

In your config/routes.rb file, have you defined the piggybak_coupons namespaced attached to the PiggybakCoupons engine?

mount PiggybakCoupons::Engine => '/demo', :as => 'piggybak_coupons'

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants