| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|\
| |
| | |
Deprecate reflection class name to accept a class
|
| |
| |
| |
| |
| |
| |
| |
| | |
The idea of `class_name` as an option of reflection is that passing a
string would allow us to lazy autoload the class.
Using `belongs_to :client, class_name: Customer` is eagerloading models more than necessary
and creating possible circular dependencies.
|
|\ \
| | |
| | | |
ActionCable should not raise when a connection is already open
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
ActionCable was throwing a "Existing connection must be closed before
opening" exception which was being picked up as a production issue in
our error monitoring software. Since this happens pretty often on any
device that allows the browser to sleep (mobile) this error was getting
triggered often.
This change removes the exception, but keeps logging the occurrence. We
now return `false` to let the caller now that `open` failed.
|
|\ \ \
| | | |
| | | | |
Update increment! documentation [ci skip]
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The `increment!` and `decrement!` methods were recently reimplemented to
make them safe to call from multiple connections concurrently. This
changed their behaviour in a few ways.
Previously they used `update_attribute`, which calls the attribute
setter method, runs callbacks, and touches the record. Now they behave
more like `update_column`, writing the update to the database directly
and bypassing all of those steps.
|
|\ \ \ \
| |_|_|/
|/| | |
| | | |
| | | | |
prathamesh-sonpatki/dont-generate-erb-views-for-api-scaffold-controller
Don't generate HTML/ERB templates for scaffold controller with --api flag
|
| | | |
| | | |
| | | |
| | | | |
- Fixes #27591.
|
|\ \ \ \
| | | | |
| | | | | |
Fix random failure related to migration environment
|
| |/ / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
- Reference: https://travis-ci.org/rails/rails/jobs/189764676
- Reproduction command:
MTB_VERBOSE=2 bundle exec minitest_bisect --seed 33328 -Itest "test/cases/migration_test.rb" "test/cases/tasks/database_tasks_test.rb"
- You need to also add minitest_bisect gem to the Gemfile to reproduce
this failure.
|
|\ \ \ \
| | | | |
| | | | | |
Followup of #27596, test output of "run" method as well
|
| |/ / /
| | | |
| | | |
| | | |
| | | |
| | | | |
- #27596 Updated "run" and "migrate" method for returning correct
value but only added test for "migrate" method. This commit adds a
test for "run" as well.
|
|\ \ \ \
| |/ / /
|/| | |
| | | |
| | | | |
NickLaMuro/fix-deep-nesting-where-clauses-with-joins
Fix bug with symbolized keys in .where with nested join
|
| | | |
| | | |
| | | |
| | | | |
Avoids a NoMethodError when table_name is a symbol instead of a string.
|
| | |/
| |/|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This will cause a failure with the changes from 8e2e5f9:
https://github.com/rails/rails/commit/8e2e5f9e3d1f434e265dc104ea9b00ff75702fc3
With the `singularize` call that is being done in that method when there
is multiple nestings of associations (JOIN calling a JOIN) and the
`stringify_keys!` is only called once here:
https://github.com/rails/rails/blob/21e5fd4/activerecord/lib/active_record/relation/where_clause_factory.rb#L16
And not in the subsequent recursion in `.predicate_builder`
|
|\ \ \
| |/ /
|/| | |
Preserve `up` and `down` return type
|
|/ /
| |
| |
| |
| |
| | |
In Rails 4.2 calling `ActiveRecord::Migrator.migrate` would return an array of results. Without realizing that this return type was expected I accidentally introduced a change in https://github.com/rails/rails/commit/4d60e93174a3d6d90b1a06fc7515cb5cd749a6f3
This PR preserves the previous behavior and adds a test on the return type. This will need a backport to 5.0 branch.
|
|\ \
| | |
| | | |
ensure `#compact` of HWIDA to return HWIDA
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
`Hash#compact` of Ruby native returns new hash.
Therefore, in order to return HWIDA as in the past version, need to
define own `#compact` to HWIDA.
Related: #26868
|
|\ \ \
| | | |
| | | |
| | | | |
Allow to custom content type when setting mailer body
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
|\ \ \ \
| | | | |
| | | | | |
[documentation] ActiveRecord: Document order of Callbacks
|
| | | | | |
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Update `cookies` helper on all HTTP requests
|
|/ / / / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Regression introduced by ae29142142324545a328948e059e8b8118fd7a33 / 8363b879fe759f0645179f4521cc64795efbee6e.
Previously, cookies were only updated on `GET` requests. Now we will
update the helper for all requests, as part of `process`. Added
regression tests for all available HTTP method helpers in
`ActionController::TestCase`.
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | | |
Actually, private methods cannot be called with `self.`, so it's not just redundant, it's a bad habit in Ruby
|
| | | | |
| | | | |
| | | | |
| | | | | |
And let's see if it still fails...
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | | |
this fixes sqlite3-1.3.12/lib/sqlite3/pragmas.rb:301: warning: method redefined; discarding old integrity_check
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Optimizing information_schema query for `foreign_keys`
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Need `table_name` to avoid all databases scan.
See https://dev.mysql.com/doc/refman/5.7/en/information-schema-optimization.html.
```
> EXPLAIN SELECT fk.referenced_table_name AS 'to_table', fk.referenced_column_name AS 'primary_key', fk.column_name AS 'column', fk.constraint_name AS 'name', rc.update_rule AS 'on_update', rc.delete_rule AS 'on_delete' FROM information_schema.key_column_usage fk JOIN information_schema.referential_constraints rc USING (constraint_schema, constraint_name) WHERE fk.referenced_column_name IS NOT NULL AND fk.table_schema = 'activerecord_unittest' AND fk.table_name = 'fk_test_has_pk' AND rc.table_name = 'fk_test_has_pk'\G
*************************** 1. row ***************************
id: 1
select_type: SIMPLE
table: fk
partitions: NULL
type: ALL
possible_keys: NULL
key: TABLE_SCHEMA,TABLE_NAME
key_len: NULL
ref: NULL
rows: NULL
filtered: NULL
Extra: Using where; Open_full_table; Scanned 0 databases
*************************** 2. row ***************************
id: 1
select_type: SIMPLE
table: rc
partitions: NULL
type: ALL
possible_keys: NULL
key: TABLE_NAME
key_len: NULL
ref: NULL
rows: NULL
filtered: NULL
Extra: Using where; Open_full_table; Scanned 1 database; Using join buffer (Block Nested Loop)
2 rows in set, 1 warning (0.00 sec)
```
Fixes #27579.
|
|/ / / / / |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
We use aes-256-cbc cipher by default and it only accepts keys with 32
bytes at max.
Closes #27576.
[ci skip]
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Clarify that mattr_* creates public methods
|
| | | | | | |
|
| | | | | | |
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
Add "check_parameters" option to "current_page?"
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Example:
For "http://www.example.com/shop/checkout?order=desc&page=1"
current_page?('http://www.example.com/shop/checkout')
=> true
current_page?(
'http://www.example.com/shop/checkout',
check_parameters: true
)
=> false
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
Fix typo in asset_pipeline.md [ci skip]
|
|/ / / / / / / |
|
|\ \ \ \ \ \ \
| |_|_|_|_|/ /
|/| | | | | | |
Require "models/post" before "models/comment"
|
|/ / / / / /
| | | | | |
| | | | | |
| | | | | | |
Refer a similar pull request #26370
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
Update asset fingerprinting information
|