Wednesday, July 21, 2010

[Rails] rails partials violate javascripts "same origin policy"?

Hello,

In my rails application.html.erb, I have in javascript, an ajax post
call defined in a dom element's click method. This ajax call works fine
whenever I'm at a view that is a standard render. However, whenever I'm
at anything that is rendered using a rails partial, I get a 405 "method
not allowed" error on that ajax post. All my googling points to 405
errors commonly being caused by violating a brower's "same origin
policy" for javascript requests.

Does doing an ajax request from a rails partial really cause a "same
origin policy" violation? If so, why?
--
Posted via http://www.ruby-forum.com/.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate