Created
July 10, 2014 13:54
-
-
Save peterberkenbosch/07faaf5877d7e22c00c3 to your computer and use it in GitHub Desktop.
add custom fields on order serializer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Override the order serializer, adding the needed attributes: | |
class MyOrderSerializer < Spree::Wombat::OrderSerializer | |
attributes :shipping_instructions | |
end | |
# make sure to update config/initializers/wombat.rb to include the new serializer: | |
config.payload_builder = { | |
"Spree::Order" => {:serializer => "MyOrderSerializer", :root => "orders"}, | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment