aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Remove old test that check duplicated items in the load pathRafael Mendonça França2016-07-131-16/+0
| | | | | | This test was added to protect the test suite from our mistakes but now it is failing because bundler does add duplicated libs in the load path by design (if the repository has more than one gem)
* Missing require 'active_support/multibyte/unicode'Akira Matsuda2016-07-121-0/+1
|
* Merge pull request #25797 from kei-s/migrations_linksVipul A M2016-07-124-7/+7
|\ | | | | [ci skip] Update redirecting links in guides
| * [ci skip] Update redirecting links in guideskei-s2016-07-124-7/+7
|/
* Merge pull request #25690 from robin850/speed-up-rdocXavier Noria2016-07-121-0/+13
|\ | | | | Speed up RDoc generation when it's already been done once
| * Speed up RDoc generation when it's already been done onceRobin Dupret2016-07-111-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Only include files that contain changes since the last generation of the API documentation. Thus, only modified files are re-generated instead of the whole API. The `created.rid` file won't contain the whole list of files anymore if we generate several times the API but we don't really care about it, only the generation date and time is important. It is possible to fall back to the previous behavior by defining the ALL environment variable running the `rake rdoc` task.
* | Merge pull request #25794 from mechanicles/rails-to-RailsRafael França2016-07-128-10/+10
|\ \ | | | | | | rails -> Rails [ci skip]
| * | rails -> Rails [ci skip]Santosh Wadghule2016-07-128-10/+10
| | |
* | | Merge pull request #25793 from jmondo/strptimeRafael França2016-07-123-0/+17
|\ \ \ | | | | | | | | Raise ArgumentError for bad strptime arguments
| * | | Raise ArgumentError for bad strptime argumentsJohn Gesimondo2016-07-113-0/+17
|/ / /
* | | Merge pull request #25792 from prathamesh-sonpatki/test-typoMatthew Draper2016-07-122-6/+1
|\ \ \ | | | | | | | | Remove duplicate test and fix a typo in the test
| * | | Remove duplicate test and fix a typo in the testPrathamesh Sonpatki2016-07-122-6/+1
|/ / / | | | | | | | | | | | | - Tests for dup'ing params was separately added in a separate file in https://github.com/rails/rails/pull/25735.
* | | Merge pull request #25735 from timrogers/actioncontroller-parameters-dupMatthew Draper2016-07-122-14/+48
|\ \ \ | | | | | | | | Stop changes to a dupped `ActionController::Parameters` mutating the original
| * | | Trust `Object#dup` in `ActionController::Parameters`, using ↵Tim Rogers2016-07-082-16/+20
| | | | | | | | | | | | | | | | | | | | | | | | `#initialize_copy` to manually duplicate the underlying parameters hash It looks like `ActionController::Parameters#dup` is leftover from when the class inherited from `Hash`. We can just trust `#dup`, which already copies the `@permitted` instance variable (confirmed by tests). We still define a `#initialize_copy` to make `@parameters` a copy that can be mutated without affecting the original instance.
| * | | Changes to a dupped `ActionController::Parameters` mutate the originalTim Rogers2016-07-072-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When `ActionController::Parameters` is duplicated with `#dup`, it doesn't create a duplicate of the instance variables (e.g. `@parameters`) but rather maintains the reference (see <http://ruby-doc.org/core-2.3.1/Object.html>). Given that the parameters object is often manipulated as if it were a hash (e.g. with `#delete` and similar methods), this leads to unexpected behaviour, like the following: ``` params = ActionController::Parameters.new(foo: "bar") duplicated_params = params.dup duplicated_params.delete(:foo) params == duplicated_params ``` This fixes the bug by defining a private `#initialize_copy` method, used internally by `#dup`, which makes a copy of `@parameters`.
* | | | AS::Duration should serialize empty values correctly. (#25656)Paul Sadauskas2016-07-112-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current implementation serializes zero-length durations incorrectly (it serializes as `"-P"`), and cannot un-serialize itself: ``` [1] pry(main)> ActiveSupport::Duration.parse(0.minutes.iso8601) ActiveSupport::Duration::ISO8601Parser::ParsingError: Invalid ISO 8601 duration: "-P" is empty duration from /Users/rando/.gem/ruby/2.3.1/gems/activesupport-5.0.0/lib/active_support/duration/iso8601_parser.rb:96:in `raise_parsing_error' ``` Postgres empty intervals are serialized as `"PT0S"`, which is also parseable by the Duration deserializer, so I've modified the `ISO8601Serializer` to do the same. Additionally, the `#normalize` function returned a negative sign if `parts` was blank (all zero). Even though this fix does not rely on the sign, I've gone ahead and corrected that, too, in case a future refactoring of `#serialize` uses it.
* | | | Merge pull request #25782 from kamipo/fix_test_failureRafael França2016-07-111-3/+2
|\ \ \ \ | | | | | | | | | | Fix Active Record test failure
| * | | | Fix Active Record test failureRyuta Kamizono2016-07-121-3/+2
|/ / / / | | | | | | | | | | | | Caused at a45363a2fb53e0a016f33dd211c00b5d81764379.
* | | | Merge pull request #25575 from ↵Sean Griffin2016-07-111-2/+13
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | taboularasa/taboularasa/update-docs-ActiveModel__Type__Boolean [ci skip] add class level documentation to ActiveModel::Type::Boolean
| * | | | [ci skip] add class level documentation to ActiveModel::Type::BooleanDavid Elliott2016-07-111-2/+13
| | | | | | | | | | | | | | | | | | | | add documentation of the behaviors of type coercion at the class level
* | | | | Always prefer class types to query types when casting `group`Sean Griffin2016-07-114-6/+23
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When `group` is used in combination with any calculation method, the resulting hash uses the grouping expression as the key. Currently we're incorrectly always favoring the type reported by the query, instead of the type known by the class. This causes differing behavior depending on whether the adaptor actually gives proper types with the query or not. After this change, the behavior will be the same on all adaptors -- we see if we know the type from the class, fall back to the type from the query, and finally fall back to the identity type. Fixes #25595
* | | | Merge pull request #25773 from jmondo/patch-2प्रथमेश Sonpatki2016-07-111-1/+1
|\ \ \ \ | |_|/ / |/| | | Update class_attribute docs
| * | | Update class_attribute docsJohn Gesimondo2016-07-101-1/+1
|/ / /
* | | Merge pull request #25757 from monkey-mas/add-tests-for-response_testGuillermo Iguaran2016-07-101-0/+20
|\ \ \ | | | | | | | | Add tests for 1xx, 204 and 304 responses to response_test.rb
| * | | Add tests for 1xx, 204 and 304 responses to response_test.rbMasaru Nomura2016-07-091-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In response_test.rb, we haven't had a test to make sure that 1) these responses don't have a message-body as described in RFC7231[1] 2) 1xx and 204 responses must not have a Content-Length header field as described in RFC7230-section3.3.2[2] [1] https://tools.ietf.org/html/rfc7231 [2] https://tools.ietf.org/html/rfc7230#section-3.3.2 Even though our implementation doesn't allow users to send a Content-Length header field in a 304 response, sending the header field is valid as mentioned in RFC7230-section3.3.2[2]. So I've decided not to test whether or not a 304 response has the header. The citation from the section is as follows; ``` A server MAY send a Content-Length header field in a 304 (Not Modified) response to a conditional GET request (Section 4.1 of [RFC7232]); a server MUST NOT send Content-Length in such a response unless its field-value equals the decimal number of octets that would have been sent in the payload body of a 200 (OK) response to the same request. ```
* | | | Merge pull request #25769 from y-yagi/remove_unnecessary_sendGuillermo Iguaran2016-07-101-5/+5
|\ \ \ \ | | | | | | | | | | remove unnecessary send
| * | | | remove unnecessary sendyuuji.yaginuma2016-07-101-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | `class_variable_get` is public from Ruby 1.9. Ref: http://ruby-doc.org/core-2.2.0/Module.html#method-i-class_variable_get
* | | | | Merge branch 'master' of github.com:rails/docrailsVijay Dev2016-07-103-3/+18
|\ \ \ \ \ | |/ / / / |/| | | |
| * | | | Fix documentation for number_with_precision helper in AV guide [ci skip]Prathamesh Sonpatki2016-07-061-1/+1
| | | | | | | | | | | | | | | | | | | | - It accepts `precision` option, not `number_with_precision`.
| * | | | Expand on Instance variables section with an example and specify when the ↵Vipul A M2016-07-021-1/+14
| | | | | | | | | | | | | | | | | | | | instance variables are set.[ci skip]
| * | | | Fix number_with_precision documentation for precision [ci skip]Vipul A M2016-07-021-1/+1
| | | | |
| * | | | Expand on #24071 for specifying custom locale fallbacks. [ci skip]Vipul A M2016-06-291-1/+3
| | | | |
* | | | | Merge pull request #25759 from prathamesh-sonpatki/changelog-cleanupsRafael França2016-07-092-8/+12
|\ \ \ \ \ | | | | | | | | | | | | Cleanup CHANGELOGs [ci skip]
| * | | | | Cleanup CHANGELOGs [ci skip]Prathamesh Sonpatki2016-07-092-8/+12
| | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | - Cleanup Active Record CHANGELOG. - Add missing CHANGELOG for https://github.com/rails/rails/pull/25688. - Clarify that assets requests logging is suppressed.
* | | | | Merge pull request #25766 from vipulnsward/fix-ac-tests-2-4Rafael França2016-07-091-1/+1
|\ \ \ \ \ | |/ / / / |/| | | | Fix AJ tests on ruby 2.4 being caused since classes are unified for Integer
| * | | | Fix AJ tests on ruby 2.4 being causes since classes are unified for Integer, ↵Vipul A M2016-07-091-1/+1
| | | | | | | | | | | | | | | | | | | | and we create test name nased on arg class. Append ar as well to the test name
* | | | | Merge pull request #23636 from rab/fix-to_param-truncationMatthew Draper2016-07-093-4/+41
|\ \ \ \ \ | | | | | | | | | | | | fix to_param to maximize content
| * | | | | fix to_param to maximize contentRob Biedenharn2016-07-083-4/+41
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The documentation states that parameter values longer than 20 characters will be truncated by words, but the example shows that a parameter based on "David Heinemeier Hansson" (with id: 125) becomes "125-david" when "David Heinemeier".length == 16 so why so short? The answer lies in the use of the #truncate option omission: nil which seems to have been intended to mean "nothing", but which actually causes the default string "..." to be used. This causes #truncate to cleave words until the "..." can be added and still remain within the requested size of 20 characters. The better option is omission: '' (which is probably what was originally intended). Furthermore, since the use of #parameterize will remove non-alphanumeric characters, we can maximize the useful content of the output by calling parameterize first and then giving truncate a separator: /-/ rather than a space.
* | | | | Merge pull request #25652 from prathamesh-sonpatki/rm-boot-railsGuillermo Iguaran2016-07-0838-46/+3
|\ \ \ \ \ | | | | | | | | | | | | Remove unused boot_rails method and it's usage
| * | | | | Remove unused boot_rails method and it's usagePrathamesh Sonpatki2016-07-0438-46/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - The `boot_rails` method from abstract_unit.rb is empty after 2abcdfd978fdcd491576a237e8c6b. - So let's remove it and its usage.
* | | | | | Merge pull request #25688 from mahnunchik/host-env-varGuillermo Iguaran2016-07-082-0/+8
|\ \ \ \ \ \ | | | | | | | | | | | | | | Use the HOST environment variable for rails server #25677
| * | | | | | Use the HOST environment variable for rails server #25677Evgeny Vlasenko2016-07-052-0/+8
| | | | | | |
* | | | | | | Correct changelog layoutMatthew Draper2016-07-091-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | [ci skip]
* | | | | | | Insert changelog entry for #25615Matthew Draper2016-07-091-0/+7
| | | | | | |
* | | | | | | Merge pull request #25624 from tinco/actioncable_write_raceMatthew Draper2016-07-092-2/+12
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Fix race condition in websocket stream write
| * | | | | | | fix race condition in websocket stream writeTinco Andringa2016-07-011-0/+4
| | | | | | | |
* | | | | | | | Merge pull request #25714 from robin850/changelog-25692Rafael Mendonça França2016-07-071-0/+6
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a changelog entry for #25692
| * | | | | | | | Add a changelog entry for #25692 [ci skip]Robin Dupret2016-07-061-0/+6
| | | | | | | | |
* | | | | | | | | Merge pull request #25745 from alexcameron89/schema_statementsVipul A M2016-07-071-12/+12
|\ \ \ \ \ \ \ \ \ | |_|_|_|_|/ / / / |/| | | | | | | | [ci skip] Update documentation in AR SchemaStatements
| * | | | | | | | [ci skip] Update documentation in AR SchemaStatementsAlex Kitchens2016-07-071-12/+12
|/ / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | This includes minor grammar fixes throughout the file.