-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make Array handling in payload values more compact to reflect subsequent equal tags #21
base: master
Are you sure you want to change the base?
Conversation
In order to create "<a>1</a><a><b>1</b><b>2</b></a>", you used to to call .xml([{ :a => 1 }, { :a => [{:b => 1 }, { :b => 2 }] }]). Now you will only need to call .xml(a: [1, { b: [1, 2] } ])
@bjjb Took up your suggestion to make it backward compatible. Here is the result. |
Please remember to use the "=>" over ":" for hashes, since this project targets ruby 1.8.7 as well.
it can be fixed with "xml_of(:a=> [ 1, { :b=> [1, 2] } ])" |
Ok, will change it in a minute. |
…melize and #input_xml This will break code that relies on Ebayr::Request methods made private. You should not rely on these methods anyway, since they are, though not private, class internals.
aad0046
to
43a9d49
Compare
Any progress here? |
Any chance that theses changes will make it into master? If not, let us close it. |
Hi @meismann The changes currently conflict with other changes in master. Is it still an issue for you? If not, then I guess we can just close it. If so, then I can make some suggestions for prepping the MR. |
Old behaviour:
New behaviour:
If a value in this Hash is an Array, then each of the Array's elements is wrapped in the same tag (which is the value's key), like here (1 and 2 are both wrapped in the tag
b
):If you have to, you can switch the legacy syntax on with this setting:
Also:
These methods cannot be used from outside of
Ebayr::Request
any more:.xml, .serialize_input, .camelize, #input_xml