Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Use bundler --pre for travis builds | Jeremy Kemper | 2013-01-03 | 1 | -1/+1 |
| | |||||
* | Bump bundler dep to 1.3.0.pre.4+ to introduce 'bundle binstubs <gem>' | Jeremy Kemper | 2013-01-03 | 1 | -1/+1 |
| | |||||
* | Reuse the Column integer converter | Rafael Mendonça França | 2013-01-03 | 1 | -1/+1 |
| | |||||
* | Change duplicated test name | Rafael Mendonça França | 2013-01-03 | 1 | -2/+2 |
| | |||||
* | Merge pull request #8734 from jstirk/master-column_writer_to_i_errors | Rafael Mendonça França | 2013-01-03 | 4 | -8/+37 |
|\ | | | | | Fix undefined method `to_i' introduced in 3.2.9 | ||||
| * | Fix undefined method `to_i' introduced since 3.2.8 | Jason Stirk | 2013-01-04 | 4 | -8/+37 |
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit fixes a bug introduced in 96a13fc7 which breaks behaviour of integer fields. In 3.2.8, setting the value of an integer field to a non-integer (eg. Array, Hash, etc.) would default to 1 (true) : # 3.2.8 p = Post.new p.category_id = [ 1, 2 ] p.category_id # => 1 p.category_id = { 3 => 4 } p.category_id # => 1 In 3.2.9 and above, this will raise a NoMethodError : # 3.2.9 p = Post.new p.category_id = [ 1, 2 ] NoMethodError: undefined method `to_i' for [1, 2]:Array Whilst at first blush this appear to be sensible, it combines in bad ways with scoping. For example, it is common to use scopes to control access to data : @collection = Posts.where(:category_id => [ 1, 2 ]) @new_post = @collection.new In 3.2.8, this would work as expected, creating a new Post object (albeit with @new_post.category_id = 1). However, in 3.2.9 this will cause the NoMethodError to be raised as above. It is difficult to avoid triggering this error without descoping before calling .new, breaking any apps running on 3.2.8 that rely on this behaviour. This patch deviates from 3.2.8 in that it does not retain the somewhat spurious behaviour of setting the attribute to 1. Instead, it explicitly sets these invalid values to nil : p = Post.new p.category_id = [ 1, 2 ] p.category_id # => nil This also fixes the situation where a scope using an array will "pollute" any newly instantiated records. @new_post = @collection.new @new_post.category_id # => nil Finally, 3.2.8 exhibited a behaviour where setting an object to an integer field caused it to be coerced to "1". This has not been retained, as it is spurious and surprising in the same way that setting Arrays and Heshes was : c = Category.find(6) p = Post.new # 3.2.8 p.category_id = c p.category_id # => 1 # This patch p.category_id = c p.category_id # => nil This commit includes explicit test cases that expose the original issue with calling new on a scope that uses an Array. As this is a common situation, an explicit test case is the best way to prevent regressions in the future. It also updates and separates existing tests to be explicit about the situation that is being tested (eg. AR objects vs. other objects vs. non-integers) | ||||
* | Merge pull request #8732 from amatsuda/readme_call_yield | Rafael Mendonça França | 2013-01-03 | 1 | -1/+1 |
|\ | | | | | a tiny fix in the generated README | ||||
| * | no, call <%= yield %> | Akira Matsuda | 2013-01-04 | 1 | -1/+1 |
|/ | |||||
* | Merge pull request #8731 from amatsuda/readme_dir_tree | Guillermo Iguaran | 2013-01-03 | 1 | -11/+15 |
|\ | | | | | update directory tree in the generated README | ||||
| * | update directory tree in the generated README | Akira Matsuda | 2013-01-04 | 1 | -11/+15 |
| | | |||||
* | | Add documentation to ActionDispatch::Http::UploadedFile#headers | Rafael Mendonça França | 2013-01-03 | 1 | -0/+1 |
| | | | | | | | | [ci skip] | ||||
* | | Merge pull request #8730 from robin850/master | Rafael Mendonça França | 2013-01-03 | 2 | -3/+3 |
|\ \ | | | | | | | Fix missing spaces in method definitions | ||||
| * | | Fix missing spaces before and after equal signs in method definitions | Robin Dupret | 2013-01-03 | 2 | -3/+3 |
| | | | |||||
* | | | Merge pull request #8729 from timraymond/help_message_for_install_script | Rafael Mendonça França | 2013-01-03 | 1 | -0/+5 |
|\ \ \ | | | | | | | | | Adding a usage message to install.rb script | ||||
| * | | | Adding a usage message to install.rb script | Tim Raymond | 2013-01-03 | 1 | -0/+5 |
|/ / / | | | | | | | | | | | | | | | | | | | Previously, invoking the install.rb script with zero arguments caused it to attempt to install all gems without a version suffix, which would fail spectacularly. Failing gracefully with a usage message is more helpful to a first-time user. | ||||
* | | | Merge pull request #8728 from amatsuda/model_all_returns_a_relation | Rafael Mendonça França | 2013-01-03 | 1 | -1/+1 |
|\ \ \ | |/ / |/| | | A small fix for an AR test case | ||||
| * | | need to to_a the Relation to execute SQL here | Akira Matsuda | 2013-01-04 | 1 | -1/+1 |
| |/ | |||||
* | | Merge pull request #8727 from robin850/patch-2 | Rafael Mendonça França | 2013-01-03 | 1 | -1/+0 |
|\ \ | | | | | | | Remove a useless TODO comment | ||||
| * | | Remove a useless TODO comment | Robin Dupret | 2013-01-03 | 1 | -1/+0 |
|/ / | |||||
* | | Merge pull request #8705 from amparo-luna/change_update_attributes_to_update | Guillermo Iguaran | 2013-01-03 | 38 | -132/+181 |
|\ \ | | | | | | | Rename update_attributes method to update | ||||
| * | | Add Changelog entry regarding update_attibutes being renamed to update | Amparo Luna + Guillermo Iguaran | 2013-01-03 | 1 | -0/+7 |
| | | | |||||
| * | | Updating default application templates to use update instead of ↵ | Amparo Luna + Guillermo Iguaran | 2013-01-03 | 4 | -6/+6 |
| | | | | | | | | | | | | update_attributes | ||||
| * | | Change guides to use update instead of update_attributes | Amparo Luna + Guillermo Iguaran | 2013-01-03 | 7 | -19/+19 |
| | | | |||||
| * | | Change docs to use update instead of update_attributes | Amparo Luna + Guillermo Iguaran | 2013-01-03 | 8 | -12/+12 |
| | | | |||||
| * | | Rename update_attributes method to update, keep update_attributes as an alias | Amparo Luna + Guillermo Iguaran | 2013-01-03 | 19 | -95/+137 |
| | | | |||||
* | | | Merge pull request #8725 from mattdbridges/patch-2 | Guillermo Iguaran | 2013-01-03 | 1 | -1/+1 |
|\ \ \ | | | | | | | | | Typo and grammar fixes in the ActionPack CHANGELOG | ||||
| * | | | Typo and grammar fixes in the ActionPack CHANGELOG | Matt Bridges | 2013-01-03 | 1 | -1/+1 |
|/ / / | |||||
* | | | Merge pull request #8713 from goshakkk/better-error-page | Guillermo Iguaran | 2013-01-03 | 2 | -12/+10 |
|\ \ \ | | | | | | | | | Fix env toggling, improve error page styling | ||||
| * | | | fix env toggling, improve error page styling | Gosha Arinich | 2013-01-03 | 2 | -12/+10 |
| | | | | |||||
* | | | | Merge pull request #8719 from pcasaretto/fix-actionview-doc-typo | Carlos Antonio da Silva | 2013-01-03 | 1 | -1/+1 |
|\ \ \ \ | |_|_|/ |/| | | | Fix typo on form_tag_helper.rb [ci skip] | ||||
| * | | | Fix typo on form_tag_helper.rb | Paulo Luis Franchini Casaretto | 2013-01-03 | 1 | -1/+1 |
|/ / / | | | | | | | | | | The inline documentantion had a typo that was somewhat confusing. | ||||
* | | | Merge pull request #8717 from amatsuda/scaffold_controller_test_patch | Carlos Antonio da Silva | 2013-01-03 | 3 | -5/+5 |
|\ \ \ | | | | | | | | | test PATCH method for update action in generated scaffold controller test rather than PUT | ||||
| * | | | test PATCH method for update action in generated scaffold controller test ↵ | Akira Matsuda | 2013-01-03 | 3 | -5/+5 |
| | | | | | | | | | | | | | | | | rather than PUT | ||||
* | | | | Merge pull request #8715 from goshakkk/refactor-mapper | Carlos Antonio da Silva | 2013-01-03 | 1 | -9/+4 |
|\ \ \ \ | | | | | | | | | | | Refactor Routing::Mapper#matches? | ||||
| * | | | | refactor Routing::Mapper | Gosha Arinich | 2013-01-03 | 1 | -9/+4 |
| | |/ / | |/| | | |||||
* | | | | Merge pull request #8714 from utkarshkukreti/faster-gem-install | Carlos Antonio da Silva | 2013-01-03 | 2 | -5/+5 |
|\ \ \ \ | |_|/ / |/| | | | Pass in `--local` when doing `gem install` for local gems. [ci skip] | ||||
| * | | | Pass in `--local` when doing `gem install` for local gems. | Utkarsh Kukreti | 2013-01-03 | 2 | -5/+5 |
|/ / / | |||||
* | | | Merge pull request #8706 from steveklabnik/ip_precautions | Rafael Mendonça França | 2013-01-02 | 1 | -3/+4 |
|\ \ \ | | | | | | | | | Explain the possible IP precautions | ||||
| * | | | Explain the possible precautions | Andre Arko | 2013-01-02 | 1 | -3/+4 |
|/ / / | |||||
* | | | Merge pull request #7980 from steveklabnik/issue_7979 | Guillermo Iguaran | 2013-01-02 | 5 | -113/+166 |
|\ \ \ | | | | | | | | | Restore original remote_ip algorithm. | ||||
| * | | | Restore original remote_ip algorithm. | Andre Arko | 2013-01-02 | 5 | -113/+166 |
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Proxy servers add X-Forwarded-For headers, resulting in a list of IPs. We remove trusted IP values, and then take the last given value, assuming that it is the most likely to be the correct, unfaked value. See [1] for a very thorough discussion of why that is the best option we have at the moment. [1]: http://blog.gingerlime.com/2012/rails-ip-spoofing-vulnerabilities-and-protection/ Fixes #7979 | ||||
* | | | Changelog improvements [ci skip] | Carlos Antonio da Silva | 2013-01-02 | 3 | -4/+5 |
| | | | |||||
* | | | missing changelog entry for #8682 | Akira Matsuda | 2013-01-02 | 1 | -0/+4 |
|/ / | |||||
* | | Merge pull request #8697 from goshakkk/undup | Rafael Mendonça França | 2013-01-02 | 1 | -5/+3 |
|\ \ | | | | | | | Remove another unnecessary dup | ||||
| * | | remove another unnecessary dup | Gosha Arinich | 2013-01-02 | 1 | -5/+3 |
| | | | |||||
* | | | CVE-2012-5664 options hashes should only be extracted if there are extra ↵ | Aaron Patterson | 2013-01-02 | 1 | -0/+12 |
| | | | | | | | | | | | | | | | | | | | | | parameters Conflicts: activerecord/lib/active_record/dynamic_matchers.rb | ||||
* | | | Merge pull request #8701 from senny/8700_double_slash_with_trailing_slash | Rafael Mendonça França | 2013-01-02 | 3 | -7/+33 |
|\ \ \ | | | | | | | | | do not append a second slash when using `trailing_slash: true` | ||||
| * | | | do not append a second slash when using | Yves Senn | 2013-01-02 | 3 | -7/+33 |
| |/ / | |||||
* | | | Fixing closing </p> | Guillermo Iguaran | 2013-01-02 | 1 | -1/+1 |
| | | | |||||
* | | | Merge pull request #8702 from rubys/master | Guillermo Iguaran | 2013-01-02 | 2 | -8/+7 |
|\ \ \ | | | | | | | | | Fix a number of validation/style errors |