| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
- better `if` example
- Added chaining example to the try method description
- Documented the `respond_to?` check to the try method description
- Clearer wording to explain that argument error is raised on argument mismatch to responding method, rather than to non-responding method (which is handled without exception by `try`)
- `.any?` is more precise than `! .blank?`
- Don't need to use `try` on `children` as (for regular associations) they will always be a collection or array that responds to `first`
- Fix typos/grammar
|
|\
| |
| | |
AR Migrations Guide#Foreign Keys: fix wrong table
|
|/
|
| |
[skip ci]
|
|\
| |
| | |
DRY up try/try!
|
| | |
|
|\ \
| |/
|/| |
Secure compare
|
| | |
|
| | |
|
| | |
|
|\ \
| |/
|/| |
|
|/ |
|
|\
| |
| | |
Fix error string raised from AJ enqueue_at for ClassQueueAdapter
|
| | |
|
|\ \
| | |
| | | |
Inline AJ around_perform and around_enqueue in CallbackJob used for tests
|
| |/ |
|
| | |
|
|\ \
| | |
| | | |
Bring try! into parity with try.
|
|/ /
| |
| |
| | |
Based on commit 5e51bdda.
|
|\ \
| | |
| | | |
:nail_care: fix typos in activejob queuing test
|
|/ / |
|
|\ \
| | |
| | | |
fix small typo in routing test
|
|/ / |
|
|\ \
| | |
| | | |
Fix url generation error message
|
| | | |
|
| | | |
|
|\ \ \
| |_|/
|/| | |
Provide more reasoning to not accept cosmetic changes [ci skip]
|
| | | |
|
|\ \ \
| | | |
| | | | |
Activejob cleanups
|
| | | |
| | | |
| | | |
| | | | |
- Remove un-needed require in AJ rescue test.
|
| |/ / |
|
|\ \ \
| | | |
| | | | |
Remove duplicate 'select' database statement
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The `select` method has the same definition in almost all database
adapters, so it can be moved from the database-specific adapters
(PostgreSQl, MySQL, SQLite) to the abstract `database_statement`:
```ruby
def select(sql, name = nil, binds = [])
exec_query(sql, name, binds)
end
```
---
More details about this commit: the only two DB-specific adapters
that have a different definition of `select` are MySQLAdapter and
MySQL2Adapter.
In MySQLAdapter, `select` invokes `exec_query(sql, name, binds)`, so
calling `super` achieves the same goal with less repetition.
In MySQL2Adapter, `select` invokes `exec_query(sql, name)`, that is,
it does not pass the `binds` parameter like other methods do. However,
[MySQL2Adapter's `exec_query`](https://github.com/rails/rails/blob/74a527cc63ef56f3d0a42cf638299958dc7cb08c/activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb#L228L231)
works exactly the same whether this parameters is passed or not, so the output
does not change:
```ruby
def exec_query(sql, name = 'SQL', binds = [])
result = execute(sql, name)
ActiveRecord::Result.new(result.fields, result.to_a)
end
```
|
|\ \ \
| |/ /
|/| | |
AJ doc fixes [ci skip]
|
| | |
| | |
| | |
| | | |
[ci skip]
|
|/ /
| |
| |
| |
| |
| |
| |
| | |
accepts blocks for `assert_no_enqueued_jobs` and `assert_no_performed_jobs` test helpers.
- args => arguments when used in actual docs.
[ci skip]
|
|\ \
| | |
| | | |
Mention `perform_now` in AJ base docs to specify how to immediately invoke a job [ci skip]
|
| | |
| | |
| | |
| | | |
job. [ci skip]
|
| | | |
|
|\ \ \
| | | |
| | | | |
Enable emitting of warnings from ActiveJob tests.
|
| | | | |
|
| | | | |
|
|\ \ \ \
| | | | |
| | | | |
| | | | | |
Message on AR::UnknownAttributeError should include the class name of a record
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This would be helpful if 2 models have an attribute that has a similar
name to the other. e.g:
before:
User.new(name: "Yuki Nishijima", projects_attributes: [name: "kaminari"])
# => ActiveRecord::UnknownAttributeError: unknown attribute: name
after:
User.new(name: "Yuki Nishijima", projects_attributes: [name: "kaminari"])
# => ActiveRecord::UnknownAttributeError: unknown attribute on User: name
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This would be helpful if 2 models have an attribute that has a similar
name to the other. e.g:
before:
User.new(name: "Yuki Nishijima", projects_attributes: [name: "kaminari"])
# => ActiveRecord::UnknownAttributeError: unknown attribute: name
after:
User.new(name: "Yuki Nishijima", projects_attributes: [name: "kaminari"])
# => ActiveRecord::UnknownAttributeError: unknown attribute on User: name
|
|\ \ \ \ \
| |_|_|/ /
|/| | | | |
|
|/| | | |
| | | | |
| | | | |
| | | | | |
https://github.com/justanshulsharma/rails into justanshulsharma-activerecord-merge-docs
|
| | | | | |
|
| | |/ /
| |/| | |
|
|\ \ \ \
| |/ / /
|/| | | |
remove duplicate method (_status_code) in action_dispatch
|
| | | | |
|