| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|\
| |
| | |
Fix deprecation warning of `ActiveRecord::Migrator.migrations_path=`
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
`ActiveRecord::Migrator.migrations_path=` was deprecated in #31727.
This commit fixes:
- `ActiveRecord::Migrator.migrations_path=` is deprecated, but not
`ActiveRecord::Migrator.migrations_paths=`
- Adds missing space
The warning including this commit:
```
DEPRECATION WARNING: `ActiveRecord::Migrator.migrations_path=` is now
deprecated and will be removed in Rails 6.0. You can set the `migrations_paths`
on the `connection` instead through the `database.yml`.
```
Since it was deprecated in Rails 5.2 we should backport it to the `5-2-stable` branch.
Related to #31727
|
| |
| |
| |
| |
| |
| |
| | |
block
`ActiveRecord::MigrationContext.new` just create an instance, doesn't
have any side-effect.
|
|\ \
| | |
| | | |
Improve readability in form helpers guide [ci skip]
|
| | | |
|
|\ \ \
| |_|/
|/| |
| | |
| | | |
bogdanvlviv/fix-output-when-run-aj-integration-tests
Print correct rake command on running AJ integration tests
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Currently when executing `bundle exec rake test:integration` under `activejob/`
derectory, it prints helpful info like:
```
(snip)
*** rake aj:integration:async ***
(snip)
*** rake aj:integration:delayed_job ***
(snip)
```
but there is no defined `:aj` scope in `activejob/Rakefile`,
so I think output should be like:
```
(snip)
*** rake test:integration:async ***
(snip)
*** rake test:integration:delayed_job ***
(snip)
```
By the way `rake test:integration` doesn't work if execute it without
prepending `bundle exec` to that command. It is probably what we should
fix too.
|
|\ \
| | |
| | | |
Raise `ActiveRecord::InvalidForeignKey` in `before_destroy` for a blob if attachments exist
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
attachments exist
The issue #32584 was fixed in #33405 by adding foreign key constraint
to the `active_storage_attachments` table for blobs.
This commit implements fix on app-level in order to ensure that users
can't delete a blob with attachments even if they don't have the foreign key constraint.
See a related discussion in the Campfire:
https://3.basecamp.com/3076981/buckets/24956/chats/12416418@1236718899
Note that, we should backport it to `5-2-stable` too.
Related to #33405
|
|\ \
| |/
|/| |
PostgreSQL: prepare for pg-1.1
|
| |
| |
| |
| |
| |
| |
| |
| | |
Parsing of malformed array strings without raising an error is deprecated in
pg-1.1. It's therefore necessary to catch parser errors starting with pg-2.0.
See also pg commit:
https://bitbucket.org/ged/ruby-pg/commits/1b081326b346368e70c9c03ee7080e28d6b3a3dc
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Version 1.1.0 deprecates exec and async_exec with a params array due to
distinct semantics between calls with and without params array.
Instead exec_params or async_exec_params shall be used.
Moreover in pg-1.1.0 exec_* and prepare methods are aliases for async_exec_*
and async_prepare. async_* methods don't need to be called explicit -
they are the default now, when calling exec_* and prepare.
For pg versions before 1.1, keep using async_exec.
|
|\ \
| | |
| | |
| | |
| | | |
faucct/bugfix/preload_multiple_instances_of_same_record
ActiveRecord::Associations::Preloader should preload all instances of the same record
|
| | |
| | |
| | |
| | | |
same record
|
|\ \ \
| | | |
| | | | |
Fix av-ujs build
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The bin shim provides by `chromedriver-helper` gem has renamed to
`chromedriver-helper` since 2.0.
https://github.com/flavorjones/chromedriver-helper/pull/58
Since bin of new name is set to driver path in
`lib/chromedriver-helper.rb`, need to load it.
|
| | | | |
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
MySQL supports JOINs to UPDATE, so if column name isn't qualified by
table name, it would cause an ambiguous error:
```
Mysql2::Error: Column 'integer' in field list is ambiguous: UPDATE `pets` INNER JOIN `toys` ON `toys`.`pet_id` = `pets`.`pet_id` SET `integer` = COALESCE(`integer`, 0) + 1 WHERE `toys`.`name` = ?
```
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
`relations_test.rb`
`persistence_test.rb` and `relations_test.rb` have too many lines, so
I'd like to extract relation around tests to dedicated files before
newly test added.
|
| | |
| | |
| | |
| | |
| | | |
Get a warning about `async_exec`, but it seems that build has passed
through the fix of https://bitbucket.org/ged/ruby-pg/commits/be48d118eeedbf6b6a1f0aa14749ab97fc22065c.
|
| | | |
|
|\ \ \
| | | |
| | | | |
Fallback to unprepared statement only when bind params limit is exceeded
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This is a follow up and/or an alternative of #33844.
Unlike #33844, this would attempt to construct unprepared statement only
when bind params limit (mysql2 65535, pg 65535, sqlite3 249999) is
exceeded.
I only defined 65535 as the limit, not defined 249999 for sqlite3, since
it is an edge case, I'm not excited to add less worth extra code.
|
| |/ /
|/| |
| | |
| | | |
Follow up #33883.
|
|\ \ \
| | | |
| | | |
| | | |
| | | | |
cbisnett/active_storage_route_prefix_configuration
Configure Active Storage route prefix
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Applications can configure the route prefix prepended to the Active
Storage routes. By default this maintains the previous prefix
`/rails/active_storage` but supports custom prefixes.
Before this change the route for serving blobs is fixed to
`/rails/active_storage/blobs/:signed_id/*filename`. After this change
it's possible to configure the route to something like
`/files/blobs/:signed_id/*filename`.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
* Update association_basics.md [ci skip]
Addresses issue #33599
* Update associations.rb API documentation [ci skip]
Additional detail for documentation of `belongs_to` `association=(associate)`
* Update association_basics.md [ci skip]
Reverts misplaced documentation comment
|
|\ \ \ \
| |/ / /
|/| | | |
[ci skip] Fix documentation for Response#content_type
|
|/ / / |
|
| | | |
|
|\ \ \
| | | |
| | | | |
Remove mysql2 gem version requirement "< 0.6.0"
|
| | | |
| | | |
| | | |
| | | | |
Suggested at https://github.com/rails/rails/pull/33876#issuecomment-421176221
|
|/ / /
| | |
| | |
| | |
| | | |
Follow up #33874.
Related #23393.
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Currently, PostgreSQL + Ruby 2.5.1 build has failed.
https://travis-ci.org/rails/rails/jobs/427502723#L2940-L2942
https://travis-ci.org/rails/rails/jobs/427496382#L2921-L2923
https://travis-ci.org/rails/rails/jobs/427470858#L2921-L2923
This is because PostgreSQL server abnormally terminates when ramfs
becomes full.
Ref: https://travis-ci.org/rails/rails/jobs/427960998#L7614
This occurs since d54d0c95750e2693da495b75ac5fa0280253972d.
In d54d0c95750e2693da495b75ac5fa0280253972d, `sudo` is used in preprocessing
for setting MySQL.
In Travis, even if specified `sudo: false`, when using `sudo` in build,
sudo-enabled infrastructure is used.
https://docs.travis-ci.com/user/reference/overview/#virtualisation-environment-vs-operating-system
As container-based infrastructure was changed to sudo-enabled infrastructure,
the disk settings etc were also changed, it seems that this phenomenon occurred.
This can also be handled by extending ramfs(https://github.com/travis-ci/travis-ci/issues/9036#issuecomment-357189213).
However, using sudo-enabled in all builds affects the execution time of
build, so I think that it is good to use sudo-enabled only in the necessary builds.
|
|\ \ \
| |/ /
|/| | |
SQLite3 adapter supports expression indexes
|
| | | |
|
|\ \ \
| | | |
| | | |
| | | |
| | | | |
Bump MySQL version requirement to 5.5.8 in the template files
[ci skip]
|
| | | |
| | | |
| | | |
| | | | |
Follow-up #33853
|
|\ \ \ \
| | | | |
| | | | | |
Improve API document on Object#blank?
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
* Introduce `falsey` to represent both `nil` and `false`.
* Keep consistent order between abstract description and examples.
|
|\ \ \ \ \
| |_|_|/ /
|/| | | | |
Conditionally use `helper_method` in Flash concern
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
I was attempting to use the `flash` functionality in a `Metal`
controller. When including the `flash` concern I received the following
error:
NoMethodError: undefined method `helper_method'....
Either:
- `AbstractController::Helpers` should be a dependency of
`ActionController::Flash`
- `ActionController::Flash` should not require the existence of
`AbstractController::Helpers`.
Since my use case (set a flash and redirect) has no need for the helper
method and that is a common use case, making the dependency conditional
seemed the better option.
NOTE: This is similar to issue #21067 only the error is within Rails
itself while that issue had the error within Devise.
|
|\ \ \ \ \
| |_|_|/ /
|/| | | | |
add `any?` to DatabaseConfigurations
|
| | | | | |
|
|\ \ \ \ \
| | | | | |
| | | | | |
| | | | | | |
Allow subclasses to redefine autosave callbacks for associated records
|
| | | | | | |
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
Validate if `utf8mb4` character set and longer index key prefix is supported
|