| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The status returned in the rack [status, headers, body] array was
a string, which can cause problems with middleware that assumes the
status will be a Fixnum. This likely never surfaced because other
middleware to_i the status returned from downstream apps before
passing it on.
|
|\ \ \
| | | |
| | | | |
Add documentation for Duration#to_i for clarification
|
|/ / / |
|
|\ \ \
| | | |
| | | |
| | | |
| | | | |
nerdinand/remove-activesupport-integer-example-doc
Remove reference to Numeric#from_now, as it is no longer supported [ci skip]
|
|/ / / |
|
|\ \ \
| | | |
| | | | |
remove old unavailable link with relevant fix patch 1
|
| | | | |
|
|\ \ \ \
| |/ / /
|/| | | |
update mysql link that has been replaced
|
|/ / / |
|
| | |
| | |
| | |
| | |
| | |
| | | |
This is obviously all very internal, but sometimes you have to look at
it... and when you do, it'll save a lot of confusion if it doesn't lie
about its identity.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The subtype will (quite reasonably) ignore the possibility that it has
`changed_in_place?` by becoming nil.
Fixes #19467
|
| | |
| | |
| | |
| | | |
No need to merge hashes when simply setting options does the job.
|
| | |
| | |
| | |
| | | |
The expected value comes first. Related to #19465.
|
|\ \ \
| | | |
| | | | |
Fix ActiveModel::Errors#delete return value to stay backward compatible
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Rails 5.0 changes to ActiveModel::Errors include addition of `details`
that also accidentally changed the return value of `delete`. Since
there was no test for that behavior it went unnoticed. This commit
adds a test and fixes the regression.
Small improvements to comments have also been made. Since `get` is
getting deprecated it is better to use `[]` in other methods' code
examples. Also, in the module usage example, `def Person.method`
was replaced with a more commonly used `def self.method` code style.
|
|\ \ \
| | | |
| | | | |
[ci skip] Consistent spacing inside hash brackets in Action View guide.
|
| | | | |
|
| | | | |
|
|\ \ \ \
| | | | |
| | | | | |
Deprecate alias_method_chain in favour of Module#prepend
|
| | | | |
| | | | |
| | | | | |
…as discussed #19413
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Change 'a' to 'an' for 'HABTM' word [ci skip]
|
|/ / / / / |
|
|\ \ \ \ \
| |_|/ / /
|/| | | | |
[ci skip] Add link for "parameter_names section"
|
|/ / / / |
|
|\ \ \ \
| |_|/ /
|/| | | |
[ci skip] Change `the null` to `a not null constraint`
|
|/ / / |
|
|\ \ \
| | | |
| | | | |
Fix typo in belongs_to_required_by_default config's CHANGELOG entry [ci...
|
|/ / / |
|
|\ \ \
| | | |
| | | | |
Fix documentation for find_or_create_by
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The code in the comment fails on concurrent inserts if done inside a transaction.
The fix is to force a savepoint to run so that if the database raises an unique violation exception. Otherwise, you'll get errors like:
```
(0.3ms) BEGIN
Cart Load (0.5ms) SELECT "carts".* FROM "carts" WHERE "carts"."uuid" = '12345' LIMIT 1
# Another process inserts a cart with uuid of '12345' right now
SQL (4371.7ms) INSERT INTO "carts" ("created_at", "updated_at", "uuid") VALUES ('2015-03-21 01:05:07.833231', '2015-03-21 01:05:07.833231', '12345') RETURNING "id" [["created_at", Sat, 21 Mar 2015 01:05:07 PDT -07:00], ["updated_at", Sat, 21 Mar 2015 01:05:07 PDT -07:00], ["uuid", "12345"]]
PG::UniqueViolation: ERROR: duplicate key value violates unique constraint "carts_uuid_idx1"
DETAIL: Key (uuid)=(12345) already exists.
: INSERT INTO "carts" ("created_at", "updated_at", "uuid") VALUES ('2015-03-21 01:05:07.833231', '2015-03-21 01:05:07.833231', '12345') RETURNING "id"
# Retrying the find
Cart Load (0.8ms) SELECT "carts".* FROM "carts" WHERE "carts"."uuid" = '12345' LIMIT 1
PG::InFailedSqlTransaction: ERROR: current transaction is aborted, commands ignored until end of transaction block
: SELECT "carts".* FROM "carts" WHERE "carts"."uuid" = '12345' LIMIT 1
(0.1ms) ROLLBACK
ActiveRecord::StatementInvalid: PG::InFailedSqlTransaction: ERROR: current transaction is aborted, commands ignored until end of transaction block
: SELECT "carts".* FROM "carts" WHERE "carts"."uuid" = '12345' LIMIT 1
```
|
|\ \ \ \
| | | | |
| | | | | |
Check subtype limit before using the default limit
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
As described here https://github.com/rails/rails/issues/19420. When
using the Postgres BigInt[] field type the big int value was not being
translated into schema.rb. This caused the field to become just a
regular integer field when building off of schema.rb. This fix will
address this by delegating the limit from the subtype to the Array type.
https://github.com/rails/rails/issues/19420
|
| |_|/ /
|/| | | |
|
|\ \ \ \
| | | | |
| | | | | |
Fix ActiveModel::Errors deprecation messages failing when used on its own
|
| | |/ /
| |/| |
| | | |
| | | |
| | | |
| | | | |
Deprecation messages in ActiveModel::Errors are using String#squish
from ActiveSupport but were not explicitly requiring it, causing failures
when used outside rails.
|
| |/ /
|/| |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The previous change 92a3c8dcdf174dab5e8759031b6bbe6cd891fe3c improved
this example, but calling .create + #valid? ends up running validations
twice, and we don't want to showcase that.
Lets use the normal use case of building a new object and calling #save
on it, which is what a basic scaffold with Active Record does.
[ci skip]
|
|\ \ \
| | | |
| | | | |
use `Dir.exist?` instead of deprecated `Dir.exists?`
|
| |/ / |
|
|\ \ \
| | | |
| | | | |
Removed requiring ostruct because its unused
|
| |/ / |
|
|\ \ \
| |/ /
|/| | |
[ci skip] Fix typos in test runner's help output
|
|/ / |
|
|\ \
| | |
| | | |
[ci skip] Check a result of `valid?` instead of `create`
|
|/ / |
|
| |
| |
| |
| | |
This reverts commit 044f9ab7a4d6646ddce4560bb83b58cdc0baa751.
|
| |
| |
| |
| |
| |
| | |
Also edited the copy to be more consistent with `rake routes`.
See #19323.
|
|\ \
| | |
| | | |
Fix handling of empty X_FORWARDED_HOST header.
|
| | |
| | |
| | |
| | |
| | |
| | | |
Previously, an empty X_FORWARDED_HOST header would cause
Actiondispatch::Http:URL.raw_host_with_port to return nil, causing
Actiondispatch::Http:URL.host to raise a NoMethodError.
|
| | | |
|