Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

ActiveResource Generates Wrong XML for multi_parameter_attributes

#862

Reported by Matthew Moore · August 19th, 2008 @ 11:13 PM

State: wontfix
Milestone: 2.x
Assigned to: nobody
Importance: none

Activity

  1. Matthew Moore
    Matthew Moore
    • 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'

    August 19th, 2008 @ 11:19 PM

  2. josh
    josh
    • State changed from new to wontfix

    November 22nd, 2008 @ 06:56 PM

  3. af001
    af001

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

    May 5th, 2011 @ 03:00 AM