Ruby on Rails Tuesday, February 19, 2013

I have a journalist and publication model related with a habtm. In the edit journalist form there is a multiline select for publications.

When :remote => false this works well, the parameter for the publications looks like:
publication_ids"=>["", "4256","4271"]

BUT if I use :remote => true the parameter array allways has size = 2:
publication_ids"=>["", "4256,4271"]
The quotes are missing and only the first relation gets saved.

Since the problem is only in the ajax call I don't think I have done anything wrong.

Rails 3.2.12, Ruby 1.9.3-p374. This is quite an old application so I use prototype.

Hs anyone experienced this, what can be the cause?

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/Lsogxw9FWbEJ.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

No comments:

Post a Comment