When I post this XML to my controller:
<?xml version="1.0" encoding="utf-8"?> <transcoder_queue xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance" xmlns:xsd=“http://www.w3.org/2001/XMLSchema”>
0
<campaign_id>1</campaign_id>
<created_at>0001-01-01T00:00:00</created_at>
<updated_at>0001-01-01T00:00:00</updated_at>
</transcoder_queue>
it is deserialized like thus;
Processing TranscoderQueueController#create (for 192.168.1.107 at
2007-10-10 16:32:49) [POST]
Session ID: d2c14f967f10c53f8b90b5deb19b34ff
Parameters: {“action”=>“create”, “controller”=>“transcoder_queue”,
“transcoder_queue”=>{“updated_at”=>“0001-01-01T00:00:00”,
“campaign_id”=>“5”, “xmlns:xsd”=>“http://www.w3.org/2001/XMLSchema”,
“id”=>“0”, “xmlns:xsi”=>“http://www.w3.org/2001/XMLSchema-instance”,
“created_at”=>“0001-01-01T00:00:00”}}
Notice how “xmlns:xsd” and "“xmlns:xsi” are treated as attributes of
the TranscoderQueue object rather then ignored as xml specific data.
Anyways, since we have 2 unknown attributes the @transcoder_queue =
TranscoderQueue.new(params[:transcoder_queue]) fails…
Why would rails do this?