| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The existing UJS event behavior relies on browsers not sending events for
various events when an element is disabled. For example, imagine the following:
<button type="submit" disabled="disabled">Click me</button>
The above button is disabled, so browsers will not trigger a click event and
all UJS behavior is prevented. However, imagine a button like this:
<button type="submit" disabled="disabled"><strong>Click me</strong></button>
The above is treated differently by browsers such as Chrome/Safari. These
browsers do not consider the strong tag to be disabled, and will trigger click
events. UJS has logic to walk up the DOM to find an associated element subject
to UJS behavior. But, this logic does not take into account the disabled
status of the element.
I originally thought we could simply change the selectors used to match
elements to ignore disabled elements. However, UJS disables some elements as
part of the event chain. So, an element might match early in the chain and
then fail to match later. Instead of changing the selectors I added a callback
to the chain that calls `stopEverything` if an element is disabled when the
event chain begins.
|
|\
| |
| | |
Show correct commands in help
|
| |
| |
| |
| |
| | |
Currently rails' help shows only namespace. However, the secrets command
needs to specify command. Therefore, I fixed the command to display in help.
|
| |
| |
| |
| |
| |
| | |
Mostly just that it's there.
Closes #28193.
|
|\ \
| | |
| | |
| | | |
Deprecate `Migrator.schema_migrations_table_name`
|
| | |
| | |
| | |
| | |
| | | |
Since 67fba0cf `SchemaMigration` model was extracted.
Use `SchemaMigration.table_name` instead.
|
|\ \ \
| | | |
| | | | |
Fix select with block doesn't return newly built records in has_many association
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The `select` in `QueryMethods` is also an enumerable method.
Enumerable methods with block should delegate to `records` on
`CollectionProxy`, not `scope`.
Fixes #28348.
|
|\ \ \ \ |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Previously the system test subclasses would call `driven_by` when the
app booted and not again when the test was initialized which resulted in
the driver from whichever class was called last to be used in tests.
In rails/rails#28144 the `driven_by` method was changed to run `use` on
setup and `reset` on teardown. While this was a viable fix this really
pointed to the problem that system test `driven_by` was a global
setting, rather than a per-class setting.
To alieviate this problem calling the driver should be done on an
instance level, rather than on the global level. I added an `initialize`
method to `SystemTestCase` which will call `use` on the superclass
driver. Running the server has been moved to `start_application` so that
it only needs to be called once on boot and no options from `driven_by`
were being passed to it.
This required a largish rewrite of the tests. Each test needs to utilize
the subclass so that it can properly test the drivers.
`ActionDispatch::SystemTestCase` shouldn't be called directly anymore.
|
|/ / / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Since using a browser is only for selenium it doesn't really make sense
to have a separate class for handling it there. This brings a lot of the
if/else out of the main SystemTestCase class and into the Driver class
so we can abstract away all that extra work.
|
|/ / /
| | |
| | |
| | | |
See the rationale in the comment found in the patch.
|
|\ \ \
| |/ /
|/| | |
Document using `default_url_options` in an ActionMailer class.
|
| | | |
|
|\ \ \
| |/ /
|/| | |
Tests for delegated public methods on AC::Parameters
|
| | | |
|
|\ \ \
| |/ /
|/| | |
Use appropriate type in generators test
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This fixes the following thor's warning.
```
Expected string default value for '--generate'; got false (boolean)
```
|
| | |
| | |
| | |
| | | |
[ci skip]
|
|\ \ \
| | | |
| | | | |
Document delegated public methods on AC::Parameters
|
|/ / /
| | |
| | | |
[ci skip]
|
|\ \ \
| |/ /
|/| | |
Improve foreign key description in guides
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
In #27674 we changed the migration generator to generate migrations at
the path defined in `Rails.application.config.paths` however the code
checked for the presence of the `Rails` constant but not the
`Rails.application` method which caused problems when using Active
Record and generators outside of the context of a Rails application.
Fixes #28325.
|
|\ \ \
| | | |
| | | | |
Remove `:on` option that does ot exist [ci skip]
|
| | | |
| | | |
| | | |
| | | | |
That option was removed in 0a683085b1db435b7371350b2799a0f248cd717a
|
| | | | |
|
|\ \ \ \
| |/ / /
|/| | | |
Fix typo `titlelize` -> `titleize` [ci skip]
|
|/ / / |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
In 4b685aa the regex in `titlelize` was updated to not match
apostrophes to better reflect the nature of the transformation.
Unfortunately this had the side effect of breaking capitalization
on the first word of a sub-string, e.g:
>> "This was 'fake news'".titleize
=> "This Was 'fake News'"
This is fixed by extending the look-behind to also check for a
word character on the other side of the apostrophe.
Fixes #28312.
|
|\ \ \
| | | |
| | | | |
Update `database.yml` when `rails new <new_app> -d oracle` specified
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
- Install "activerecord-oracle_enhanced-adapter".
Oracle adapter used to be a bundled one. Now it is a 3rd party one.
Also "ruby-oci8" is a required gem for CRuby, not for JRuby.
- Remove oracle entry for JRuby since Oracle enhanced adapter
supports both CRuby and JRuby with single gem.
- Change adapter name from `oracle` to `oracle_enhanced` in the oracle.yml.
Not changing `-d oracle`
- Update `DATABASE_URL` entry to use a dash instead of an underscore
Refer https://github.com/rails/rails/commit/d72a0cbc807a14d3eec02a53317d11b9d9fa5815
for the reason.
|
| | | | |
|
|\ \ \ \
| | | | |
| | | | | |
Fix malformed asset_url in ActionController::Renderer
|
| | | | | |
|
|\ \ \ \ \
| |/ / / /
|/| | | | |
Extract `SchemaMigration.all_versions`
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Use `SchemaMigration.all_versions` instead of
`SchemaMigration.all.map(&:version)` to avoid to instantiate AR objects.
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Fix `deserialize` with JSON array
|
| |/ / / /
| | | | |
| | | | |
| | | | | |
Fixes #28285.
|
|\ \ \ \ \
| |/ / / /
|/| | | | |
Fix `direct` with params example [ci skip]
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Since `ActionController:Parameters` does not inherit `Hash`, need to
explicitly convert it to `Hash`.
Also, `Parameters#to_h` returns `Hash` whose key is `String`. Therefore,
if merge as it is, the value will not be overwritten as expected.
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Fix CI failure due to contain <U+2028>
|
|/ / / / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
```diff
diff --git a/actionpack/lib/action_controller/metal/redirecting.rb b/actionpack/lib/action_controller/metal/redirecting.rb
index a3159c29dd..1836a07d4e 100644
--- a/actionpack/lib/action_controller/metal/redirecting.rb
+++ b/actionpack/lib/action_controller/metal/redirecting.rb
@@ -50,8 +50,8 @@ module Redirecting
# redirect_to post_url(@post), status: 301, flash: { updated_post_id: @post.id }
# redirect_to({ action: 'atom' }, alert: "Something serious happened")
#
- # Statements after redirect_to in our controller get executed, so redirect_to doesn't stop the execution of the function.
- <U+2028># To terminate the execution of the function immediately after the redirect_to, use return.
+ # Statements after +redirect_to+ in our controller get executed, so +redirect_to+ doesn't stop the execution of the function.
+ # To terminate the execution of the function immediately after the +redirect_to+, use return.
# redirect_to post_url(@post) and return
def redirect_to(options = {}, response_status = {})
raise ActionControllerError.new("Cannot redirect to nil!") unless options
```
https://travis-ci.org/rails/rails/jobs/207908041#L549
|
|\ \ \ \ \
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
kamipo/remove_useless_migrator_schema_migrations_table_name
Remove useless `Migrator.schema_migrations_table_name`
|
| |/ / / /
| | | | |
| | | | |
| | | | | |
Simply use `SchemaMigration.table_name` instead.
|
|\ \ \ \ \
| | | | | |
| | | | | | |
[ci skip] Use return with redirect_to
|
| | | | | | |
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
y-yagi/do_not_take_screenshot_if_driver_does_not_support_it
Do not take screenshot if driver does not support screenshot
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
`Capybara::RackTest::Driver` does not support taking screenshots. If call
`#save_screenshot` on `Capybara::RackTest::Driver` will raise the error.
```ruby
Error:
UsersTest#test_visiting_the_index:
Capybara::NotSupportedByDriverError: Capybara::Driver::Base#save_screenshot
```
To prevent errors, if driver does not support screenshot, do not call it.
|