| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| | |
Explicitly require AS::Notifications in AS::Cache
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Right now, if you install the current release version of Active Support (5.0.2) and try to use its cache implementation standalone by requiring `active_support/cache`, it crashes with `NameError: uninitialized constant ActiveSupport::Notifications`. `AS::Notifications` is used in `cache.rb` down around [line 555](https://github.com/rails/rails/blob/8776a7139757d0b264785c774d4e7f37d4bc1ac7/activesupport/lib/active_support/cache.rb#L555).
Here's a quick repro script:
```ruby
require "bundler/inline"
gemfile(true) do
source "https://rubygems.org"
gem "activesupport", "5.0.2"
end
require "active_support/cache"
cache_store = ActiveSupport::Cache::MemoryStore.new
cache_store.write('test', 'okay')
puts cache_store.read('test')
```
However, any version _newer_ than 5.0.2 passes.
This is because [this commit](https://github.com/rails/rails/commit/75924c4517c8f87712d3f59c11f10152ed57b9d8) inadvertently included `AS::Notifications` into `AS::Cache` (thus fixing the issue) by mixing [`AS::Deprecation` into `AS::Duration`](https://github.com/rails/rails/blob/75924c4517c8f87712d3f59c11f10152ed57b9d8/activesupport/lib/active_support/duration.rb#L4), giving you a nice require chain of [`Cache` including `Time`][1] [including `Duration`][2] [including `Deprecation`][3] [including `Behaviors`][4] [including `Notifications`][5]. Phew.
Aside from being not very explicit, the fact that the fixing is specifically done by `AS::Deprecation` means that this fix is probably only temporary (until the deprecation is removed).
This PR just makes the inclusion explicit to future-proof against this breakage.
(Ideally, this would also be backported to `5-0-stable` to get picked up in any subsequent point release.)
See also: https://github.com/rails/rails/pull/14667
[1]: https://github.com/rails/rails/blob/75924c4517c8f87712d3f59c11f10152ed57b9d8/activesupport/lib/active_support/cache.rb#L6
[2]: https://github.com/rails/rails/blob/75924c4517c8f87712d3f59c11f10152ed57b9d8/activesupport/lib/active_support/time.rb#L2
[3]: https://github.com/rails/rails/blob/75924c4517c8f87712d3f59c11f10152ed57b9d8/activesupport/lib/active_support/duration.rb#L4
[4]: https://github.com/rails/rails/blob/75924c4517c8f87712d3f59c11f10152ed57b9d8/activesupport/lib/active_support/deprecation.rb#L16
[5]: https://github.com/rails/rails/blob/75924c4517c8f87712d3f59c11f10152ed57b9d8/activesupport/lib/active_support/deprecation/behaviors.rb#L1
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The current check for whether to add an optional format to the path
is very lax and will match things like `:format_id` where there are
nested resources, e.g:
resources :formats do
resources :items
end
Fix this by using a more restrictive regex pattern that looks for
the patterns `(.:format)`, `.:format` or `/` at the end of the path.
Note that we need to allow for multiple closing parenthesis since
the route may be of this form:
get "/books(/:action(.:format))", controller: "books"
This probably isn't what's intended since it means that the default
index action route doesn't support a format but we have a test for
it so we need to allow it.
Fixes #28517.
|
| |
| |
| |
| | |
[ci skip]
|
|\ \
| | |
| | | |
Add more explanation to to_time about timezones
|
| |/
| |
| |
| |
| | |
There's a difference in the results between `Date#to_time(:local)` and
`Date#in_time_zone` but it is subtle and can confuse users (like me :-).
|
|/
|
|
|
|
|
| |
Add missing word "programming", to clarify what type of language Ruby is
;)
[ci skip]
|
|\
| |
| | |
Add Puerto Rico support to ActiveSupport::TimeZone
|
| | |
|
| | |
|
|\ \
| | |
| | | |
Add missing word 'to' [ci skip]
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
While the original sentence is easy to understand, adding the 'to' is
imho a bit more correct.
Sources:
* https://ell.stackexchange.com/q/16964
* https://www.usingenglish.com/forum/threads/127099-It-is-referred-as-or-It-is-referred-to-as
|
|\ \ \
| |/ /
|/| | |
Smooth form with upgrading
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Allows users to not have remote forms by default, since there's
more JS harness, e.g. bundling rails-ujs, otherwise.
Also don't skip creating defaults file anymore. Sprockets isn't the only new config.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Effectively treat nil values as "auto", e.g. whatever a form helper
chooses to interpret it as.
But treat an explicitly assigned false value as disabling.
|
| | |
| | |
| | |
| | | |
Since 1a92ae83 all `indexes` methods are under the `SchemaStatements`.
|
| | |
| | |
| | |
| | | |
[ci skip]
|
| |/
|/|
| |
| | |
[ci skip]
|
|\ \
| | |
| | | |
Support Descending Indexes for MySQL
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
MySQL 8.0.1 and higher supports descending indexes: `DESC` in an index
definition is no longer ignored.
See https://dev.mysql.com/doc/refman/8.0/en/descending-indexes.html.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* Use keyword arguments in `IndexDefinition` to ease to ignore unused
options and to avoid to initialize incorrect empty value.
* Place it in `SchemaStatements` for consistency.
* And tiny tweaks.
|
| | | |
|
| | | |
|
|\ \ \
| |/ /
|/| | |
Use the config value directly when call `secrets`
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Currently, `read_encrypted_secrets` is set with initializer.
Therefore if refer to `secrets` in config, `read_encrypted_secrets` is false,
so can not get the value of `secrets.yml.enc`.
In order to be able to refer to secrets in config, modified to refer to
`config.read_encrypted_secrets` when calling `secrets`.
Fixes #28618.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Changelog links at the top of the components, and lowercased the 'c' in
notable changes. Personally, the styling isn't super important to me, but
it's what we always done in previous guides, so I figured it's better to
keep with what we've always done.
[ci skip]
|
|\ \ \
| |_|/
|/| | |
Prevent aliases Array#append and Array#prepend
|
| | |
| | |
| | |
| | | |
https://github.com/ruby/ruby/commit/f57d515d69b7a35477b9ba5d08fe117df1f1e275
|
|\ \ \
| | | |
| | | | |
Started adding release notes for Rails 5.1 [ci skip]
|
| | | | |
|
|\ \ \ \
| | | | |
| | | | | |
Rename `association_query_handler.rb` to `association_query_value.rb`
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Since `AssociationQueryHandler` and `PolymorphicArrayHandler` has
removed in #28715, only exists `AssociationQueryValue` and
`PolymorphicArrayValue` in these files.
|
|\ \ \ \ \
| |/ / / /
|/| | | | |
Early return in `PredicateBuilder::ArrayHandler`
|
|/ / / /
| | | |
| | | |
| | | | |
Partitioning to `values` and `nils` is unneeded before early return.
|
|\ \ \ \
| |_|_|/
|/| | | |
Fix module name [ci skip]
|
|/ / /
| | |
| | |
| | | |
Replace `FormOptionHelper` to `FormOptionsHelper`.
|
|\ \ \
| | | |
| | | | |
Move around AR::Dirty and fix _attribute method
|
|/ / /
| | |
| | |
| | |
| | |
| | | |
We already have a _read_attribute method that can get the value we need
from the model. Lets define that method in AM::Dirty and use the
existing one from AR::Dirty rather than introducing a new method.
|
|\ \ \
| | | |
| | | |
| | | |
| | | | |
bogdanvlviv/fix-dirty-attributes-if-override-attr_accessor
Fix inconsistency with changed attributes when overriding AR attribute reader
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Support `:offset` in `Time#change` and `:zone` or `:offset`
in `ActiveSupport::TimeWithZone#change`.
Fixes #28723.
|
|\ \ \ \
| | | | |
| | | | |
| | | | |
| | | | | |
kamipo/convert_association_queries_to_poro_queries
Convert association queries to PORO queries
|
| | | | |
| | | | |
| | | | |
| | | | | |
association handling
|
| | | | | |
|
| | | | | |
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Add a test case for #20802
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
The issue #20802 has been fixed in cc0b566.
Closes #20802.
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
Fix mistake in JS response parser
|
| |/ / / / /
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
-
Restore ability to accept ecmascript
JS response should not modify DOM.
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
y-yagi/make_code_statistics_task_handle_system_tests_properly
Make code statistics task handle system tests properly
|