This project is archived and is in readonly mode.
Rails3 (with Ruby 1.9.1) problem when sorting a list
-
Yehuda Katz (wycats)
- Tag changed from rails 3.0 beta, exception, logging, rails3, ruby1.9 to exception, logging, rails3, ruby1.9
- State changed from new to incomplete
Can you show me your controller code?
-
Jelle Vandebeeck
Here is my controller code.
class PagesController < ApplicationController def show # returns all the menu items to construct the list @pages = Page.in_menu end def update Page.order!(params[:menu_item]) render :nothing => true end end -
Evan Owen
+1
I'm having exactly the same issue as Jelle. The serialized parameters sent from jQuery look like "item[]=53&item[]=4" ... etc. Was working before, now its not.
It seems like this is an issue with deserializing parameters having certain structures.
-
xds2000
- Importance changed from to Low
just as We recommend Ruby 1.8.7 or Ruby 1.9.2 for use with Rails.so dont use 1.9.1
-
Rohit Arondekar
- State changed from incomplete to invalid
Ruby 1.9.1 is not supported by Rails 3. Can you reproduce this issue on 1.8.7 or 1.9.2?
Closing ticket for now but if the issue happens on the supported rubies, leave a comment and I'll reopen.
-
Tanel Suurhans
Could not reproduce this issue on 1.9.2-p0 or 1.8.7 with the same piece of html and javascript (latest jQuery and jQuery UI).
With both Rails versions the params were properly parsed into an array:Parameters: {"post"=>["1", "2", "3", "4", "5", "6", "17", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "18", "19", "20"]}