kovacs / sortable

Rails plugin to produce a sortable, paginated, searchable table for any model. Licensed with the same MIT license as rails
http://www.cablecarsoftware.com
39 stars 10 forks source link

Possible Problem with creating table header links in rails 3.0 #3

Open chrisstr opened 13 years ago

chrisstr commented 13 years ago

I've included the plugin in a rails 3.0 app and it mostly worked as expected. But i have experienced some problems with the table header generation, looks like the ActionView method "link_to" has a problem with the way the options-array is generated by "build_url_params" in sortable_helper.rb.

The solution for me was to change line 57 in sortable_helper.rb from

"return {:action => action, :params => params}" to "return {:action => action}.merge(params)"

I did that change via an initializer to prevent touching the plugin and i didn't thoroughly test it, but it works for me. And as far as i checked, it shouldn't create any unwanted side-effects.

kovacs commented 13 years ago

Hey Sorry I just saw this now... cool thanks for the report. I'll check it out when I upgrade my app to rails 3 and put that into the repo.