Right now I'm looking at the edit product view in the admin interface, but every time I try to find the option types, my api returns a 404. This appears to be because Select2 is hitting the following url: /ecommerce/api/option_types?...
(not including the actual query on purpose), even though my api url should be at /store/api/
since I have the following in my routes.rb
file: mount Spree::Core::Engine, at: '/store'
I confirmed that when I switch the code to mount Spree::Core::Engine, at: '/ecommerce'
temporarily in my routes.rb
file, my option types appeared correctly in the select2 select box.
My only guess is that earlier in the project, I had mounted the spree engine at /ecommerce
(ie mount Spree::Core::Engine, at: '/ecommerce'
). But I have since changed the code to mount it at store
, and after that have restarted the rails server in the terminal and made sure to hard refresh the browser (in case there was a caching issue somewhere), but still the select2 form is hitting the wrong route (/ecommerce/api/option_types?...
).
I tried digging through the source code, but it gets very dense very quick with select2 and its js and everything, haha.
Any guesses on how to fix this?