| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Benchmark Script
```
require 'active_record'
require 'benchmark/ips'
require 'ruby-prof'
require 'memory_profiler'
require 'byebug'
ActiveRecord::Base.establish_connection(ENV.fetch('DATABASE_URL'))
ActiveRecord::Migration.verbose = false
ActiveRecord::Schema.define do
create_table :users, force: true do |t|
t.string :name, :email
t.integer :topic_id
t.timestamps null: false
end
create_table :topics, force: true do |t|
t.string :title
t.timestamps null: false
end
end
attributes = {
name: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.',
email: 'foobar@email.com'
}
class Topic < ActiveRecord::Base
has_many :users
end
class User < ActiveRecord::Base
belongs_to :topic
end
100.times do
User.create!(attributes)
end
users = User.first(50)
Topic.create!(title: 'This is a topic', users: users)
Benchmark.ips do |x|
x.config(time: 10, warmup: 5)
x.report("preload") do
User.includes(:topic).all.to_a
end
end
```
Before
```
Calculating -------------------------------------
preload 26.000 i/100ms
-------------------------------------------------
preload 265.347 (± 3.0%) i/s - 2.652k
```
After
```
Calculating -------------------------------------
preload 39.000 i/100ms
-------------------------------------------------
preload 406.053 (± 1.7%) i/s - 4.095k
```
|
| |
|
|
|
|
| |
It's done inside each test via assert_called_with or Kernel.expects
|
| |
|
|\
| |
| | |
Update Form Helpers guide [ci skip]
|
| |
| |
| |
| |
| |
| |
| |
| | |
* It looks that example codes are not based on actual output. So I've fixed it.
* Specifically:
* There are no lines about utf-8 and authenticity_token.
* The submit button doesn't have data-disabled-with attribute.
* Each attribute order of html element is different from actual ones.
|
|\ \
| | |
| | |
| | |
| | | |
bogdanvlviv/remove-unused-variables-from-release_rb
Remove unused variable `gem_version` from `tasks/release.rb`
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
https://travis-ci.org/rails/rails/jobs/279300966#L2600
The result of `Loofah::HTML5::Scrub.scrub_css` was changed since
v2.1.0.rc1.
https://github.com/flavorjones/loofah/commit/ca56295ff9e802018ea18d23ed49be235a95ccad
|
| | | |
|
| | | |
|
| | | |
|
|\ \ \
| | | |
| | | | |
Refactor Css::Generators::ScaffoldGenerator
|
| | | |
| | | |
| | | |
| | | |
| | | | |
* define source_root by source_root method
* it don't create file, but copy it.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
It's become clear to me that the use case is still a bit muddy
and the upgrade path is going to be tough for people to figure
out.
This attempts at understanding it better through documentation,
but still needs follow up work.
[ Michael Coyne & Kasper Timm Hansen ]
|
| | | |
| | | |
| | | |
| | | | |
[ Michael Coyne & Kasper Timm Hansen ]
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Noticed that verifiers and encryptors never once mentioned key generators
and salts but only concerned themselves with generated secrets.
Clears up the confusing naming around raw_key and secret as well. And
makes the rotation API follow the constructor signature to the letter.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Spares users from passing in non-changing values explicitly.
[ Michael Coyne & Kasper Timm Hansen ]
|
| |/ /
|/| | |
|
|\ \ \
| | | |
| | | | |
Add Key Rotation to MessageEncryptor and MessageVerifier and simplify the Cookies middleware
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Using the action_dispatch.cookies_rotations interface, key rotation is
now possible with cookies. Thus the secret_key_base as well as salts,
ciphers, and digests, can be rotated without expiring sessions.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Both classes now have a rotate method where new instances are added for
each call. When decryption or verification fails the next rotation
instance is tried.
|
| | | | |
|
|\ \ \ \
| |_|/ /
|/| | | |
Update Action Mailer Basics [ci skip]
|
| | | | |
|
|\ \ \ \
| | | | |
| | | | | |
Fix rails middleware list in api_app guide [ci skip]
|
| | | | |
| | | | |
| | | | |
| | | | | |
* `MyApi::Application::Routes` is not middleware.
|
|\ \ \ \ \
| |_|_|/ /
|/| | | |
| | | | |
| | | | | |
yhirano55/fix_email_in_active_support_instrumentation
Fix email in Active Support Instrumentation [ci skip]
|
|/ / / /
| | | |
| | | |
| | | | |
* `s/ddh/dhh/`
|
|\ \ \ \
| | | | |
| | | | |
| | | | |
| | | | | |
y-yagi/make_bang_verion_work_with_inheritable_options
Make bang version work with `InheritableOptions`
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Currently, bang version does not work with `InheritableOptions`.
`InheritableOptions` treats the argument Hash as the default value.
However, `Hash#fetch` does not use the default value when key is not
found, so can not get the default value.
So in bang version, should use `Hash#[]` instead of `Hash#fetch`.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Currently the normalization only exists in `primary_key` shorthand. It
should be moved to `new_column_definition` to also affect to
`add_column` with primary key.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Currently implicit legacy primary key is compatible, but adding explicit
legacy primary key is not compatible. It should also be fixed.
Fixes #30664.
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Ensure `1 AS one` for SQL Server with Calculations
|
|/ / / / / |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
`change_column_{default,null,comment}` in mysql2 adapter are passing
`column.sql_type` as `type` to `change_column` to intend keeping
previous type. But `column_for` requires extra query, so use passing
`nil` to `type` explicitly in the internal for the purpose.
|
| | | | | |
|
| | | | | |
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Implement change_table_comment and change_column_comment
|
| | | | | | |
|
|\ \ \ \ \ \
| |/ / / / /
|/| | | | | |
Use `TOPLEVEL_BINDING` in rails runner command
|
| |/ / / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Binding to capture the local scope. This means that if a constant with same
name as constant specified by the user exists in local scope, constant
defined in local will use. This is different from what the user expects.
Therefore, fixed to use top-level binding instead of local scope.
Fixes #30644
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Use algorithm while removing index with db:rollback
|
| |/ / / /
| | | | |
| | | | |
| | | | | |
Closes #24190
|
|\ \ \ \ \
| |/ / / /
|/| | | | |
Fix "warning: `*' interpreted as argument prefix"
|
|/ / / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This fixes following warning:
```
/home/travis/build/rails/rails/activerecord/test/cases/instrumentation_test.rb:11: warning: `*' interpreted as argument prefix
/home/travis/build/rails/rails/activerecord/test/cases/instrumentation_test.rb:23: warning: `*' interpreted as argument prefix
/home/travis/build/rails/rails/activerecord/test/cases/instrumentation_test.rb:35: warning: `*' interpreted as argument prefix
/home/travis/build/rails/rails/activerecord/test/cases/instrumentation_test.rb:48: warning: `*' interpreted as argument prefix
/home/travis/build/rails/rails/activerecord/test/cases/instrumentation_test.rb:61: warning: `*' interpreted as argument prefix
```
|
|\ \ \ \
| | | | |
| | | | | |
Update link in The Asset Pipeline guide [ci skip]
|
| |/ / / |
|
|\ \ \ \
| |/ / /
|/| | |
| | | |
| | | | |
jagthedrummer/jeremy/instrumentation-payload-names
Update payload names for `sql.active_record` instrumentation to be more descriptive.
|
| | | |
| | | |
| | | |
| | | | |
Fixes #30586.
|