jetsgit / spree_tax_cloud

Spree Interface for TaxCloud SOAP API
19 stars 32 forks source link

Setting config in an initializer #52

Closed bbuchalter closed 10 years ago

bbuchalter commented 10 years ago

It would be nice to use different API keys for different environments, but it seems the TaxCloud Spree::Config preferences are not available during initialization. Any thoughts on a work around?

bbuchalter commented 10 years ago

Perhaps instead of doing a class_eval like this: https://github.com/jetsgit/spree_tax_cloud/blob/master/app/models/spree/app_configuration_decorator.rb

We should so something more like this: https://github.com/spree/spree_active_shipping/blob/258fe96b702c5290c4ce16d19e6016e3922a2c68/lib/spree/active_shipping_configuration.rb

jetsgit commented 10 years ago

If you have tested this and are able to easily change API keys, it sounds like a good idea. Submit PR for it on master, 2-2-beta

jetsgit commented 10 years ago

Fixed per @brchristian