| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
This option is useful when want to check only the files generated by
`rails new`, or if want to do something before `webpacker:install`.
|
|
|
|
|
|
|
|
|
|
|
|
| |
flakiness
Follow up 45be690f8e6db019aac6198ba49d608a2e14824b.
Somehow calling `define_attribute_methods` in `build`/`new` sometimes
causes the `table_exists?` query.
To address CI flakiness due to `assert_no_queries` failure, ensure
`define_attribute_methods` before `assert_no_queries`.
|
|\
| |
| | |
fix broken link in Action Cable guides and readme [ci skip]
|
| | |
|
| | |
|
|\ \
| |/
|/|
| |
| | |
When Content-Type is "application/x-gzip", request.content_type resolves to "application/gzip", because application/x-gzip is a synonym of application/gzip by default. This causes the acceptable_content? check in ActiveStorage::DiskController to fail, because the direct upload token contains application/x-gzip, which is not equal to application/gzip.
Fix by comparing the token content type with the request content type *and its synonyms*.
|
| | |
|
| |
| |
| |
| |
| |
| | |
Fix an issue in ActiveStorage where a direct upload to disk storage
would fail due to a content type mismatch if the file was uploaded using
a mime-type synonym.
|
|\ \
| | |
| | |
| | |
| | | |
Jcambass/fix-only-path-option-in-url-for-with-arrays
respect only_path option when an array is passed into url_for
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The url_for method is now extracting the path_only option in order to determine if polymorphic_path or polymorphic_url should be called.
If the path_only option is not set it will be set to true unless the host option is set. This behaviour is the same as when a Hash or Params object is passed.
To support this unifying the code responsible for setting this default value has been extracted into a private method
|
|\ \ \
| | | |
| | | | |
Deprecate ActionDispatch::Http::ParameterFilter in favor of ActiveSup…
|
| | | |
| | | |
| | | |
| | | | |
ActiveSupport::ParameterFilter
|
|\ \ \ \
| |/ / /
|/| | | |
[ci skip] Fix typo
|
|/ / / |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Since #31575, `set_inverse_instance` replaces the foreign key by the
current owner immediately to make it happen when a record is added to
collection association.
But `set_inverse_instance` is not only called when a record is added,
but also when a record is loaded from queries. And also, that loaded
records are not always associated records for some reason (using `or`,
`unscope`, `rewhere`, etc).
It is hard to distinguish whether or not we should invoke
`set_inverse_instance`, but at least we should avoid the undesired
side-effect which was brought from #31575.
Fixes #34108.
|
|\ \ \
| | | |
| | | | |
Fixtures refactor
|
| | | |
| | | |
| | | |
| | | | |
FixtureSet::TableRows
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | |
| | | |
| | | |
| | | | |
methods
|
| | | | |
|
|\ \ \ \
| | | | |
| | | | | |
getting started page rails version update to 5.2.1
|
| | | | | |
|
|\ \ \ \ \
| | | | | |
| | | | | | |
add test for cache_version precision
|
|/ / / / / |
|
|\ \ \ \ \
| | | | | |
| | | | | | |
ActiveStorage guide: Add instruction for test environment
|
| | | | | | |
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
Array with single item correctly uses cache_key
|
|/ / / / / / |
|
|\ \ \ \ \ \
| |_|_|/ / /
|/| | | | | |
Remove "include FileUtils" sentence in setup/update bin files
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
According with rubocop style guide "Style/MixinUsage" is good to use only in
class/module not directly in file.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Using `included` to define `attr_acessor` and `attr_writer` is causing
these methods to not show up in the documentation.
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
Add documentation to run tests with specific seed [ci skip]
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
This commit documents how to run all tests or a single test file with a
specific randomization seed.
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
Remove bundler warnings from bin/setup output
|
| |/ / / / / / |
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
Parameterized mailers can configure delivery job
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Setting parameterized_delivery_job on a mailer class will cause Parameterized::MessageDelivery to use
the specified job instead of ActionMailer::Parameterized::DeliveryJob:
class MyMailer < ApplicationMailer
self.parameterized_delivery_job = MyCustomDeliveryJob
...
end
|
|\ \ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | | |
Remove some autolabeling globs
|
| | |/ / / / / /
| |/| | | | | |
| | | | | | | |
| | | | | | | | |
[ci skip]
|
|/ / / / / / / |
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
prathamesh-sonpatki/exclude-node-modules-for-rubocop
Skip node_modules dir in the rubocop check
|
|/ / / / / / /
| | | | | | |
| | | | | | |
| | | | | | | |
- Otherwise it is running the check against all files in node_modules
|
|\ \ \ \ \ \ \
| |/ / / / / /
|/| | | | | | |
Fix tests related to new JavaScript path for generators
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
- Followup of https://github.com/rails/rails/commit/4838c1716a0340137d858fab49bf460e23be5a4b
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
23% faster Nil#try
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
is passed:
```ruby
class FooNew
def try(method_name = nil, *args)
nil
end
end
class FooOld
def try(*args)
nil
end
end
require 'benchmark/ips'
foo_new = FooNew.new
foo_old = FooOld.new
Benchmark.ips do |x|
x.report("new") { foo_new.try(:anything) }
x.report("old") { foo_old.try(:anything) }
x.compare!
end
# Warming up --------------------------------------
# new 250.633k i/100ms
# old 232.322k i/100ms
# Calculating -------------------------------------
# new 6.476M (± 4.8%) i/s - 32.332M in 5.005777s
# old 5.258M (± 3.2%) i/s - 26.485M in 5.042589s
# Comparison:
# new: 6476002.5 i/s
# old: 5257912.5 i/s - 1.23x slower
```
It's worth noting that checking for nil separately as in https://github.com/rails/rails/pull/34067 seems to be MUCH faster. It might be worth it to apply a blanket `&.` to every internal `try` call.
|