Description
We have a model with a unconventional camel-cased name "likeThis" instead of "like_this", when viewing a list of these models, and attempting to sort by that field, we get an exception from the database that that column doesn't exist because it appears to be looking for "likethis" (it looks downcased).
ActionView::Template::Error (PG::Error: ERROR: column our_table.likethis does not exist
2012-08-13T18:44:13+00:00 app[web.1]: LINE 1: SELECT "our_table".* FROM "our_table" ORDER BY our_table.likethi...
2012-08-13T18:44:13+00:00 app[web.1]: ^
2012-08-13T18:44:13+00:00 app[web.1]: : SELECT "our_table".* FROM "our_table" ORDER BY our_table.likeThis asc LIMIT 20 OFFSET 0):
2012-08-13T18:44:13+00:00 app[web.1]: 120: %tbody
...
2012-08-13T18:44:13+00:00 app[web.1]: 122: %tr
2012-08-13T18:44:13+00:00 app[web.1]: 123: %td
2012-08-13T18:44:13+00:00 app[web.1]: 124: = check_box_tag "bulk_ids[]", object.id, false
2012-08-13T18:44:13+00:00 app[web.1]: 125: - if @other_left_link ||= other_left && index_path(params.except('set').merge(params[:set].to_i != 1 ? {:set => (params[:set].to_i - 1)} : {}))
2012-08-13T18:44:13+00:00 app[web.1]: 126: %td.other.left= link_to "...", @other_left_link, :class => 'pjax'