- 12 4月, 2019 1 次提交
-
-
由 Ryuta Kamizono 提交于
Regardless of a record isn't saved (e.g. validation is failed), `after_commit` / `after_rollback` callbacks are invoked for now. To fix the issue, this adds a record to the current transaction only when a record is actually saved. Fixes #29747. Closes #29833.
-
- 10 4月, 2019 13 次提交
-
-
由 Ryuta Kamizono 提交于
Fix "autosave: true" on belongs_to of join model causes invalid records to be saved
-
由 Ryuta Kamizono 提交于
Refer #35875.
-
由 yuuji.yaginuma 提交于
For avoiding check against `node_modules` in railties's test dir.
-
由 Ryuta Kamizono 提交于
-
由 Ryuta Kamizono 提交于
All adapters (sqlite3, mysql2, postgresql, oracle-enhanced, sqlserver) doesn't use `sequence_name` in `sql_for_insert`. https://github.com/rsim/oracle-enhanced/blob/4e0db270a93859c9713fd079dbb315b9fe550e57/lib/active_record/connection_adapters/oracle_enhanced/database_statements.rb#L79-L85 https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/blob/959fe8f49744460b876bc205c73259f8d4f37629/lib/active_record/connection_adapters/sqlserver/database_statements.rb#L226-L249 It can be handled in `exec_insert` like postgresql adapter if we want.
-
由 Ryuta Kamizono 提交于
-
由 Rafael França 提交于
Improve == and hash methods on various schema cache structs to be allocation free.
-
由 Rafael França 提交于
Clarify exists check in logs
-
由 Rafael França 提交于
Adds named_captures to MatchData to emulate Regex
-
由 Brandon Weaver 提交于
This change adds a `named_captures` method to `ActionDispatch::Journey::Path::MatchData` in order to emulate a similar method present on `Regex`'s `MatchData` present in Ruby core. This method can be useful for introspection of routes without the need to use `zip` while testing or developing in Rails core.
-
由 Rafael França 提交于
Only override async adapter when seeding
-
由 Dan Fitch 提交于
The default log messages for Model.exists?, when called from .save on an object which uses scoped uniqueness validation like: class Example < ApplicationRecord validates :field, uniqueness: {scope: parent_id} end can result in slightly misleading logs. An example case: ↳ app/controllers/example_controller.rb:23 (0.2ms) begin transaction ↳ app/controllers/example_controller.rb:39 Example Exists (0.2ms) SELECT 1 AS one FROM "examples" WHERE "examples"."field" IS NULL AND "examples"."parent_id" = ? LIMIT ? [["parent_id", 123], ["LIMIT", 1]] ↳ app/controllers/example_controller.rb:39 (0.1ms) rollback transaction To me, a Rails newbie, this parsed as the following: - started the transaction to create a thing - found that your object exists already! - so we rolled back the transaction (even though the actual cause of the transaction is something that happens after the Exists check.) All this does is add a question mark to the message, to make it clear in the log that this is a check, not a confirmation. This may be kind of silly, but it may save some future goofs by newbs like me.
-
由 Ryuta Kamizono 提交于
Bring back postgresql_version as an alias.
-
- 09 4月, 2019 17 次提交
-
-
由 Ryuta Kamizono 提交于
This is also resolved in `arel_column`.
-
由 Josef Šimánek 提交于
-
由 Matthew Draper 提交于
-
由 Ryuta Kamizono 提交于
-
由 George Claghorn 提交于
FIX: ActionMailbox test helper argument list
-
由 Jean Boussier 提交于
The previous implementation would allocate 2 arrays per comparisons. I tried relying on Struct, but they do allocate one Hash inside `Struct#hash`.
-
由 Xavier Noria 提交于
-
由 Xavier Noria 提交于
-
由 BatedUrGonnaDie 提交于
-
由 प्रथमेश Sonpatki 提交于
[ci skip] Fix `#upsert` method comment
-
由 Kyle Zhao 提交于
`receive_inbound_email_from_source` should accept an argument list (`*args`) instead, to allow for the `source` argument in `create_inbound_email_from_source`. ```ruby receive_inbound_email_from_source(source, status: :processing) ``` Accepting a keyword argument list (`**kwargs`) results in an `ArgumentError` ```text ArgumentError: wrong number of arguments (given 1, expected 0) ```
-
由 Ryo Hashimoto 提交于
Because this method only updates or inserts a single record like `insert` method.
-
由 Matthew Draper 提交于
-
由 Matthew Draper 提交于
Wrap Mysql count of deleted rows in lock block to avoid conflict in test
-
由 Ryuta Kamizono 提交于
Raise `ArgumentError` for invalid `:limit` and `:precision` like as other options
-
由 Ryuta Kamizono 提交于
Except `table_name` from column objects
-
由 Quan Chau 提交于
-
- 08 4月, 2019 9 次提交
-
-
由 Eileen M. Uchitelle 提交于
Merge pull request #35888 from lxxxvi/documentation_change_foreign_keys_to_bigint_in_association_basics change `t.integer` to `t.bigint` where applicable
-
由 Eileen M. Uchitelle 提交于
Improve log messages for #insert_all` / `#upsert_all` etc. methods
-
由 Rafael França 提交于
Update configuration of `app` directory and use oxford comma [skip ci]
-
由 soartec-lab 提交于
-
由 Ryuta Kamizono 提交于
When skipping duplicates in bulk insert on MySQL, avoid assigning an AUTONUMBER column when not specified
-
由 Ryo Hashimoto 提交于
In #35077, `#insert_all` / `#upsert_all` / `#insert` / `#upsert` etc. methods are added. But Active Record logs only “Bulk Insert” log messages when they are invoked. This commit improves the log messages to use collect words for how invoked them.
-
由 Bob Lail 提交于
If `id` is an `AUTONUMBER` column, then my former strategy here of assigning `no_op_column` to an arbitrary column would fail in this specific scenario: 1. `model.columns.first` is an AUTONUMBER column 2. `model.columns.first` is not assigned in the insert attributes I added three tests: the first test covers the actual error; the second test documents that this _isn't_ a problem when a value is given for the AUTONUMBER column and the third test ensures that this no-op strategy isn't secretly doing an UPSERT.
-
由 प्रथमेश Sonpatki 提交于
[ci-skip] Add 6.0 Release Notes for Active Record
-
由 Alex Kitchens 提交于
-