| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|/ / / / |
|
|\ \ \ \
| | | | |
| | | | | |
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
|
| | | | | |
|
|\ \ \ \ \
| |/ / / /
|/| | | | |
Fixed test throwing unused variable warning
|
| | | | | |
|
|\ \ \ \ \
| |/ / / /
|/| | | | |
Make status_at methods nodoc
|
| | |/ /
| |/| |
| | | |
| | | |
| | | | |
- Also one minor change for documenting url_for method in ActionController::Metal.
[ci skip]
|
|\ \ \ \
| | | | |
| | | | | |
fix wrong example from #17318 [ci skip]
|
|/ / / / |
|
|\ \ \ \
| | | | |
| | | | | |
make guides example more friendly to nonlatin langs [ci skip]
|
|/ / / / |
|
| | | | |
|
|\ \ \ \
| | | | |
| | | | | |
[ci skip] add :queue option to deliver_later and deliver_later! documentation
|
|/ / / / |
|
| | | | |
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
claudiob/replace-slower-block-call-with-faster-yield
Replace (slower) block.call with (faster) yield
|
| | | |
| | | |
| | | |
| | | | |
This reverts commit 0ab075e75f58bf403f7ebe20546c7005f35db1f6.
|
|\ \ \ \ |
|
| |\ \ \ \
| | |/ / /
| |/| | | |
[ci skip] Add Doc of with_options for the case when inherited default options and original options have same keys
|
| | | | |
| | | | |
| | | | |
| | | | | |
options and original options have same keys
|
| |\ \ \ \
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
claudiob/replace-slower-block-call-with-faster-yield
Replace (slower) block.call with (faster) yield
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Performance optimization: `yield` with an implicit `block` is faster than `block.call`.
See http://youtu.be/fGFM_UrSp70?t=10m35s and the following benchmark:
```ruby
require 'benchmark/ips'
def fast
yield
end
def slow(&block)
block.call
end
Benchmark.ips do |x|
x.report('fast') { fast{} }
x.report('slow') { slow{} }
end
# => fast 154095 i/100ms
# => slow 71454 i/100ms
# =>
# => fast 7511067.8 (±5.0%) i/s - 37445085 in 4.999660s
# => slow 1227576.9 (±6.8%) i/s - 6145044 in 5.028356s
```
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Since some headers can appear multiple times in an email it's required
to set it to nil first when you want to overwrite an existing one.
This commit add some information about this process.
Fix #15912
|