aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/object/to_query.rb
Commit message (Collapse)AuthorAgeFilesLines
* e4e1b62 broke `to_param` handling:Edouard CHIN2018-07-121-2/+5
| | | | | | | | | | | | | | | | | | | - There was an issue inside controller tests where order params were not respected, the reason was because we were calling `Hash#to_query` which sorts the results lexicographically. 1e4e1b62 fixed that issue by not using `to_query` but instead a utility function provided by rack. - However with the fix came another issue where it's now no longer possible to do this ``` post :foo, params: { user: User.first } # Prior to the patch the controller will receive { "user" => "1" } # Whereas now you get { "user": "#<User: ...>" } ``` The fix in this PR is to modify `Hash#to_query` to sort only when it doesn't contain an array structure that looks something like "bar[]" Ref https://github.com/rails/rails/pull/33341#issuecomment-404039396
* [Active Support] `rubocop -a --only Layout/EmptyLineAfterMagicComment`Koichi ITO2017-07-111-0/+1
|
* Use frozen-string-literal in ActiveSupportKir Shatrov2017-07-091-0/+1
|
* Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"Matthew Draper2017-07-021-1/+0
| | | | | This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa.
* Enforce frozen string in RubocopKir Shatrov2017-07-011-0/+1
|
* applies new string literal convention in activesupport/libXavier Noria2016-08-061-4/+4
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* Pass symbol as an argument instead of a blockErik Michaels-Ober2014-11-291-1/+1
|
* Move to_param to to_query, also Improve testsAkshay Vishnoi2014-06-201-6/+58
|
* Do not check defined?(CGI) on every call #to_queryprintercu2014-05-131-1/+1
|
* Fix to_query with empty arrays tooRafael Mendonça França2014-02-061-1/+6
|
* Fix Hash#to_query edge case with html_safe string on 1.8 rubybrainopia2011-09-161-1/+1
|
* Revert "Quick fix for not escaping []s (not ideal)"Santiago Pastorino2010-11-181-2/+2
| | | | | | | | | According to http://www.ietf.org/rfc/rfc2616.txt and http://tools.ietf.org/rfc/rfc3986.txt [ and ] are reserved characters and should be escaped using "%" HEX HEX This reverts commit 856d2fd874d72dd9f83204affff4edfef3308361 and 1ee9b40b18a0bed5bb10a0785f7e2730bac983f6..
* Quick fix for not escaping []s (not ideal)Joshua Peek2009-12-021-1/+1
|
* Failing tests for to_param/to_query not escaping "[]"Joshua Peek2009-12-021-1/+1
|
* Consolidate Object#to_param and #to_query core extensionsJeremy Kemper2009-11-021-0/+27