| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|\
| |
| | |
Fix regression in use of string attribute in the added? method
|
| | |
|
|\ \
| |/
|/|
| |
| | |
jedrekdomanski/Update-active-record-querying-readme
Update documentation for #pluck method [ci skip]
|
|/ |
|
| |
|
| |
|
| |
|
| |
|
|\
| |
| | |
[ci skip] `sanitizer_vendor` will be removed in Rails 6
|
| |
| |
| | |
Related to https://github.com/rails/rails/pull/24386#issuecomment-403926683
|
|\ \
| | |
| | | |
e4e1b62 broke `to_param` handling:
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
- There was an issue inside controller tests where order params were not respected, the reason
was because we were calling `Hash#to_query` which sorts the results lexicographically.
1e4e1b62 fixed that issue by not using `to_query` but instead a utility function provided by rack.
- However with the fix came another issue where it's now no longer possible to do this
```
post :foo, params: { user: User.first }
# Prior to the patch the controller will receive { "user" => "1" }
# Whereas now you get { "user": "#<User: ...>" }
```
The fix in this PR is to modify `Hash#to_query` to sort only when it
doesn't contain an array structure that looks something like "bar[]"
Ref https://github.com/rails/rails/pull/33341#issuecomment-404039396
|
|\ \ \
| | | |
| | | | |
Enable `Layout/EmptyLinesAroundBlockBody` to reduce review cost in the future
|
| | |/
| |/|
| | |
| | |
| | |
| | |
| | | |
We sometimes ask "✂️ extra blank lines" to a contributor in reviews like
https://github.com/rails/rails/pull/33337#discussion_r201509738.
It is preferable to deal automatically without depending on manpower.
|
| | | |
|
| | |
| | |
| | |
| | | |
We've never intentionally tripped this retry in production. Add retries for specific errors as needed.
|
|\ \ \
| |/ /
|/| | |
Add missing env & config dependency to `rake db:seed`
|
| | | |
|
|\ \ \
| | | |
| | | | |
Fix stubbed methods in test cases
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Remove returning of `false` value for stubbed `lock_thread=` methods
since there aren't any needs in it.
Remove unnecessary returning of `true` for stubbed `drop_database` method.
Follow up #33309.
Related to #33162, #33326.
|
|\ \ \
| | | |
| | | | |
Replace shallow mocks with Ruby classes
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | | |
While preparing this I realised that some stubbed returns values
serve no purpose, so this patch drops those as well.
Step 3 in #33162
|
|/ / |
|
|\ \
| | |
| | | |
Reduce mocking by testing value instead of method call
|
|/ /
| |
| |
| | |
Step 2 in #33162
|
|\ \
| |/
|/| |
Remove unnecessary Mocha stubs
|
| |
| |
| |
| |
| |
| | |
Step 1 in #33162
[utilum + bogdanvlviv]
|
|\ \
| | |
| | | |
Add rake notes and SOURCE_ANNOTATION_DIRECTORIES deprecation to Changelog
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* SOURCE_ANNOTATION_DIRECTORIES deprecation
* Deprecation of `rake notes`, use `rails notes` instead
* Deprecation of `rails notes:custom ANNOTATION=custom`, `rails notes:optimize`, `rails notes:todo`, and `rails notes:fixme` in favor of passing `-annotations` or `-a` to `rails notes`
* They have all been deprecrated in https://github.com/rails/rails/pull/33220
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Related #31201.
If creating custom primary key (like a string) in SQLite, it would also
create an internal index implicitly which named begin with "sqlite_".
It need to be hidden since the internal object names are reserved and
prohibited for public use.
See https://www.sqlite.org/fileformat2.html#intschema
Fixes #33320.
|
| | | |
|
|\ \ \
| | | |
| | | |
| | | | |
Fix default value for mysql time types with specified precision
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The TIME, DATETIME, and TIMESTAMP types [have supported](https://mariadb.com/kb/en/library/microseconds-in-mariadb/)
a fractional seconds precision from 0 to 6.
Default values from time columns with specified precision is read
as `current_timestamp(n)` from information schema.
rake `db:schema:dump` produces `schema.rb` **without** default values for time columns with the specified precision:
t.datetime "last_message_at", precision: 6, null: false
rake `db:schema:dump` produces `schema.rb` **with** default values for time columns with the specified precision:
t.datetime "last_message_at", precision: 6, default: -> { "current_timestamp(6)" }, null: false
|
|\ \ \ \
| | | | |
| | | | | |
rails server: Allow to explicitly specify whether to output Rails's log to stdout
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Before Rails' logger output is mirrored to std out if:
* environment is development and
* the process is not daemonized
It was not possible to change that behaviour, e.g. to disable log output
in that case or enable it in other cases.
Now you can explicitly disable or enable output with the new command
line switch `--log-to-stdout`, regardless of any other circumstances.
```
// enable output in production
rails server -e production --log-to-stdout
// disable output in development
rails server -e development --no-log-to-stdout
```
Enabling output when daemonized still makes no sense (since tty is
detached), but this is ignored for now.
If the command line flag is not specified, old behaviour still
applies, so this change is completely backward compatible.
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Fix rubocop offense introduced in 161ed37
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
We prefer double quotes over single quotes.
Fixes:
```
railties/lib/rails/commands/server/server_command.rb:279:39:
C: Style/StringLiterals: Prefer double-quoted strings unless you need
single quotes to avoi d extra backslashes for escaping.
original_options.concat [ '-u', using ]
```
Related to 161ed37d7120e1f391eed19e49a3390e53e4fe91
|
| |/ / / /
|/| | | | |
|
|\ \ \ \ \
| |/ / / /
|/| | | |
| | | | |
| | | | | |
lxxxvi/multiple_expressions_in_assert_no_difference
Documentation and some tests for `assert_no_difference`
|
| | |_|/
| |/| | |
|
|\ \ \ \
| | | | |
| | | | |
| | | | |
| | | | | |
bogdanvlviv/has_secure_password-use-recovery_password-instead-of-activation_token
has_secure_password: use `recovery_password` instead of `activation_token`
|
|/ / / /
| | | |
| | | |
| | | |
| | | |
| | | | |
Since we have `has_secure_token`, it is too confusing to use `_token`
suffix with `has_secure_password`.
Context https://github.com/rails/rails/pull/33307#discussion_r200807185
|
| | | | |
|
|\ \ \ \
| | | | |
| | | | |
| | | | |
| | | | | |
bogdanvlviv/improve-docs-test-of-has_secure_password
Improve docs/test of `has_secure_password`
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
- Ensure that execution of `authenticate`/`authenticate_XXX` returns
`self` if password is correct, otherwise `false` (as mentioned in the documentation).
- Test `authenticate_password`.
|
| | |_|/
| |/| |
| | | |
| | | |
| | | | |
`has_secure_password` allows configuring name of attribute since #26764.
This commit adds a mention about it in the Active Model Basics Guide.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Consider the following model definitions:
class User < ApplicationRecord
has_one_attached :avatar
end
class Group < ApplicationRecord
has_one_attached :avatar
end
If you attempt to reflect on the User model's avatar attachment via User.reflect_on_attachment, you could receive a reflection for the Group model's avatar attachment. Fix this by ensuring that each model class uses its own Hash object to track attachment reflections.
|
|\ \ \ \
| |_|/ /
|/| | |
| | | |
| | | | |
Specify location for engine-specific commands
[ci skip]
|
| | |/
| |/|
| | |
| | |
| | |
| | | |
Be more specific when pointing out where the commands relating
to the engine should be run
[ci skip]
|