You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I often find I have to use multiple input properties to get the value for aa single output property. Right now you can do this, but you have to use before filters, like this:
before_normalize do |input, output|
input['ab'] ||= input['a'] + input['b']
input
end
That feels inelegant. What if you could define mappings with multiple "from" properties, like this:
map from('/a', '/b'), to('ab') { |a, b| a + b }
Is that something that would be worth adding? I'm happy to put some work into a PR for that if you like the idea
The text was updated successfully, but these errors were encountered:
@iainbeeston there are no way to denormalize in case of to('ab') { |a, b| a + b }, as the resulting value should have at least one of the values a or b to subsctract one from another (as in the example).
I often find I have to use multiple input properties to get the value for aa single output property. Right now you can do this, but you have to use before filters, like this:
That feels inelegant. What if you could define mappings with multiple "from" properties, like this:
Is that something that would be worth adding? I'm happy to put some work into a PR for that if you like the idea
The text was updated successfully, but these errors were encountered: