| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| | |
Wrap module around lazy load hooks
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Fix for issue https://github.com/rails/rails/issues/25784
Prior to this commit the lazy_load_hooks.rb file contained important lazy load
hooks. Since [7c90d91](https://github.com/rails/rails/commit/7c90d91c3c43bdbba25d38589aed0e2940af3bc8) the [documentation](http://api.rubyonrails.org/files/activesupport/lib/active_support/lazy_load_hooks_rb.html) did not display
the comments in this file as the docs for load hooks.
This commit wraps the code within this file in a module so we can display the
documentation for `ActiveSupport` load hooks. By extending `ActiveSupport` with
this module, all the methods within it should still be accessible through
`ActiveSupport`.
|
| |
| |
| |
| |
| |
| | |
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)
|
| | |
|
|\ \
| | |
| | | |
[ci skip] Update redirecting links in guides
|
|/ / |
|
|\ \
| | |
| | | |
Speed up RDoc generation when it's already been done once
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
|\ \ \
| | | |
| | | | |
rails -> Rails [ci skip]
|
| | | | |
|
|\ \ \ \
| | | | |
| | | | | |
Raise ArgumentError for bad strptime arguments
|
|/ / / / |
|
|\ \ \ \
| | | | |
| | | | | |
Remove duplicate test and fix a typo in the test
|
|/ / / /
| | | |
| | | |
| | | |
| | | | |
- Tests for dup'ing params was separately added in a separate file in
https://github.com/rails/rails/pull/25735.
|
|\ \ \ \
| |_|_|/
|/| | | |
Stop changes to a dupped `ActionController::Parameters` mutating the original
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
`#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.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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`.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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.
|
|\ \ \ \
| | | | |
| | | | | |
Fix Active Record test failure
|
|/ / / /
| | | |
| | | |
| | | | |
Caused at a45363a2fb53e0a016f33dd211c00b5d81764379.
|
|\ \ \ \
| | | | |
| | | | |
| | | | |
| | | | | |
taboularasa/taboularasa/update-docs-ActiveModel__Type__Boolean
[ci skip] add class level documentation to ActiveModel::Type::Boolean
|
| | | | |
| | | | |
| | | | |
| | | | | |
add documentation of the behaviors of type coercion at the class level
|
|/ / / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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
|
|\ \ \ \
| |_|/ /
|/| | | |
Update class_attribute docs
|
|/ / / |
|
|\ \ \
| | | |
| | | | |
Add tests for 1xx, 204 and 304 responses to response_test.rb
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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.
```
|
|\ \ \ \
| | | | |
| | | | | |
remove unnecessary send
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
`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
|
|\ \ \ \ \
| |/ / / /
|/| | | | |
|
| | | | |
| | | | |
| | | | |
| | | | | |
- It accepts `precision` option, not `number_with_precision`.
|
| | | | |
| | | | |
| | | | |
| | | | | |
instance variables are set.[ci skip]
|
| | | | | |
|
| | | | | |
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Cleanup CHANGELOGs [ci skip]
|
| | |/ / /
| |/| | |
| | | | |
| | | | |
| | | | |
| | | | | |
- Cleanup Active Record CHANGELOG.
- Add missing CHANGELOG for https://github.com/rails/rails/pull/25688.
- Clarify that assets requests logging is suppressed.
|
|\ \ \ \ \
| |/ / / /
|/| | | | |
Fix AJ tests on ruby 2.4 being caused since classes are unified for Integer
|
| | | | |
| | | | |
| | | | |
| | | | | |
and we create test name nased on arg class. Append ar as well to the test name
|
|\ \ \ \ \
| | | | | |
| | | | | | |
fix to_param to maximize content
|
|/ / / / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
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.
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Remove unused boot_rails method and it's usage
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
- The `boot_rails` method from abstract_unit.rb is empty after 2abcdfd978fdcd491576a237e8c6b.
- So let's remove it and its usage.
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
Use the HOST environment variable for rails server #25677
|
| | | | | | | |
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
[ci skip]
|
| | | | | | | |
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Fix race condition in websocket stream write
|
| | | | | | | | |
|
|\ \ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Add a changelog entry for #25692
|
| | | | | | | | | |
|