Forum: Ruby on Rails Rails 2.3.2 Ajax posting to XML

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
8e8fee74387611caffd7440d7d037c0c?d=identicon&s=25 James Hall (jamesh)
on 2009-04-06 17:40
I believe this might have already been discussed but i have recently
been thrown an application that was written for rails 1.2.6, and i have
been given the task to upgrade it (please note that im super to new to
ruby as well, but we can't really do anything about that)

basically the pervious person was doing an ajax call using
"path/to5.xml?_method=delete"

and then posting, however with 2.3.2, this is no longer allowed?

What would be the best way to alleviate this situation?
thanks alot!
170e2a48994775e4c298c302e6814f81?d=identicon&s=25 Starr Horne (Guest)
on 2009-04-06 18:37
(Received via mailing list)
> basically the pervious person was doing an ajax call using
> "path/to5.xml?_method=delete"
>
> and then posting, however with 2.3.2, this is no longer allowed?

You might try posting the _method parameter instead of including it in
the querystring.

SH
--
Starr Horne
Check out my Helpdesk RailsKit: http://railskits.com/helpdesk/
81b61875e41eaa58887543635d556fca?d=identicon&s=25 Frederick Cheung (Guest)
on 2009-04-06 22:33
(Received via mailing list)
On Apr 6, 4:40 pm, James Hall <rails-mailing-l...@andreas-s.net>
wrote:
> I believe this might have already been discussed but i have recently
> been thrown an application that was written for rails 1.2.6, and i have
> been given the task to upgrade it (please note that im super to new to
> ruby as well, but we can't really do anything about that)
>
> basically the pervious person was doing an ajax call using
> "path/to5.xml?_method=delete"
>
> and then posting, however with 2.3.2, this is no longer allowed?
>

What's happening when you do this ? I do vaguely recall a change where
the requests that were exempt from csrf protection changed:

https://rails.lighthouseapp.com/projects/8994/tick...
https://rails.lighthouseapp.com/projects/8994-ruby...

Fred
C59cae5d861c9f84f6ead08e445745a0?d=identicon&s=25 冷血儿 (Guest)
on 2009-04-07 09:33
(Received via mailing list)
I write code use flex3 from rails2.2 to rails2.3.And i got the same
question
with you.

Rails2.3 do not accept GET params from url.
You may try the other ways by the HTTP Headers. I dnot know if you can
change the headers for Ajax.
X_HTTP_METHOD_OVERRIDE="PUT"
This topic is locked and can not be replied to.