I am trying t o set a preference for a hash in Spree::AppConfiguration, is
that possible?

Goal is to supply a preference when constructing parameters for a SOAP
object:

'origin' => Spree::Config.preferred_tax_cloud_origin

Above would take place of hard-wired method I am using now:

'origin' => { 'Address1' => "P.O. Box 944" ,

'Address2' => nil ,

'City' => "Langley",

'State' => "Wa",

'Zip5' => "98260" ,

'Zip4' => nil }

What I attempted, but is just interpreted as a string is:

Spree::AppConfiguration.class_eval do
preference :preferred_tax_cloud_origin, :text, :default =>
"{\"Address1\": \"P.O. Box 944\", \"Address2\": \"nil\",\"City\":
\"Langley\", \"State\": \"Wa\", \"Zip5\": \"98260\", \"Zip4\": \"nil\"}"
end

If I can't pass in a hash with above, how would I be able to do that?


Thanks!

jet




--
You received this message because you are subscribed to the Google Groups "Spree" group.
To view this discussion on the web visit https://groups.google.com/d/msg/spree-user/-/VRgQ0SBQUWYJ.
To post to this group, send email to spree-user@googlegroups.com.
To unsubscribe from this group, send email to spree-user+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/spree-user?hl=en.

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupspree-user @
categoriesrubyonrails
postedDec 27, '12 at 8:37p
activeDec 27, '12 at 8:37p
posts1
users1
websitespreecommerce.com
irc#RubyOnRails

1 user in discussion

Jet: 1 post

People

Translate

site design / logo © 2022 Grokbase