This project is archived and is in readonly mode.

#862 ✓wontfix
Matthew Moore

ActiveResource Generates Wrong XML for multi_parameter_attributes

Reported by Matthew Moore | August 19th, 2008 @ 11:13 PM | in 2.x

Comments and changes to this ticket

  • Matthew Moore

    Matthew Moore August 19th, 2008 @ 11:19 PM

    • Title changed from “multi_parameter_attributes” to “ActiveResource Generates Wrong XML for multi_parameter_attributes”
    • Tag set to activeresource, bug

    Let's say you have an ActiveResource, Event, with a datetime field called "starts".

    You want to be able to initialize or update event with a multiple parameter attribute, like from a datetime select.

    One ought to be able to do: Event.new({"starts(1i)"=>"2008", "starts(2i)"=>"8", "ends(1i)"=>"2008", "starts(3i)"=>"19", "ends(2i)"=>"8", "starts(4i)"=>"21", "ends(3i)"=>"19", "starts(5i)"=>"00", "ends(4i)"=>"22", "ends(5i)"=>"00"}).save

    However, this generates XML with a syntax error: ... <starts(1i)>2008</starts(1i)> ...

    When the actual resource tries to parse the incoming XML, it dies.

    /!\ FAILSAFE /!\ Tue Aug 19 14:12:50 -0700 2008 Status: 500 Internal Server Error #<REXML::ParseException: malformed XML: missing tag start Line: Position: Last 80 unconsumed characters: <starts(1i)>2008</starts(1i)> <starts(2i)>8</starts(2i)> <ends(1i)>2008 /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rexml/parsers/baseparser.rb:356:in pull' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rexml/parsers/treeparser.rb:22:inparse'

  • josh

    josh November 22nd, 2008 @ 06:56 PM

    • State changed from “new” to “wontfix”
  • af001

    af001 May 5th, 2011 @ 03:00 AM

    私の中で、総合評価のとっても低いアバアバクロホリスタークロ銀座店。アバクロは大好きなんですけどね。一昨日の東京駅付近での打ち合わせの後、散歩がてら久々に行ってきました。そしたらビックリ!相変わらアバクロず、踊っているだけの店員さんとかもいましたが、

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

People watching this ticket

Pages