- 10 9月, 2020 2 次提交
-
-
由 Jonathan Hefner 提交于
Prior to this commit, when a translation key indicated that the translation text was HTML, the value returned by `I18n.translate` would always be marked as `html_safe`. However, the value returned by `I18n.translate` could be an untrusted value directly from `options[:default]`. This commit ensures values directly from `options[:default]` are not marked as `html_safe`.
-
由 Jonathan Hefner 提交于
Prior to this commit, when a translation key indicated that the translation text was HTML, the value returned by `I18n.translate` would always be marked as `html_safe`. However, the value returned by `I18n.translate` could be an untrusted value directly from `options[:default]`. This commit ensures values directly from `options[:default]` are not marked as `html_safe`.
-
- 09 9月, 2020 5 次提交
-
-
由 Ryuta Kamizono 提交于
-
https://github.com/rails/rails/pull/40178#issuecomment-688222844由 Ryuta Kamizono 提交于
It is a common use case especially for MySQL users.
-
由 Ryuta Kamizono 提交于
Revert #40178
-
由 John Hawthorn 提交于
Use a unique controller class per ActionView::TestCase
-
由 KapilSachdev 提交于
This reverts commit b8ab1f89, reversing changes made to 73ae5655.
-
- 08 9月, 2020 8 次提交
-
-
由 Eugene Kenny 提交于
Properly support `reverse_order` on relations with `nulls_first` or `nulls_last` calls
-
由 Kevin Deisz 提交于
If you're using the `nulls_first` or `nulls_last` functionality with an explicit ordering, then previously it wasn't properly handling calls to `#reverse` (called through `reverse_order`). This commit changes the behavior to match what would be expected.
-
由 Eugene Kenny 提交于
It's faster on Ruby 2.7+ since it avoids rehashing the keys.
-
由 Eugene Kenny 提交于
These methods are PostgreSQL-specific, and all supported versions of PostgreSQL support validating constraints.
-
由 Eugene Kenny 提交于
Add support for `NOT VALID` check constraints in PostgreSQL
-
由 Alex Robbin 提交于
Active Record already supports adding `NOT VALID` foreign key constraints in PostgreSQL, but back in #31323 when check constraint support was initially added, the ability to add a check constraint and validate it separately was not included. This adds that functionality!
-
由 Eugene Kenny 提交于
Anchor BacktraceCleaner gem filter regexp
-
由 Jonathan Hefner 提交于
This ensures the default gem filter does not affect backtrace lines that have a subpath incidentally matching a gem path. Fixes #40196.
-
- 07 9月, 2020 5 次提交
-
-
由 Muhammad Usman 提交于
Closes #40187.
-
由 Eugene Kenny 提交于
Update Gemfile.lock with rubocop-packaging
-
由 Eugene Kenny 提交于
Load Rails tasks for each new Rake::Application
-
由 Jonathan Hefner 提交于
Follow-up to #40185.
-
由 Jonathan Hefner 提交于
Follow-up to #40143. Rails Rake tasks are loaded for each new `Rake::Application` instance via `Rails.application.load_tasks`. However, under the hood, `Rails.application.load_tasks` used `require` instead of `load`, which caused Rails tasks to be loaded for only the first `Rake::Application` instance. This commit changes the relevant `require` to `load`. Fixes #40184.
-
- 06 9月, 2020 8 次提交
-
-
由 Ryuta Kamizono 提交于
Update RuboCop to v0.90
-
由 Utkarsh Gupta 提交于
Signed-off-by: NUtkarsh Gupta <utkarsh@debian.org>
-
由 Eugene Kenny 提交于
Add explain to abstract database statements.
-
由 Eugene Kenny 提交于
Support reversing of Arel expressions in reverse_order, last etc.
-
由 Kasper Timm Hansen 提交于
Shorten inspect on ActionDispatch::Request
-
由 Kasper Timm Hansen 提交于
Shorten inspect on AbstractController::Base
-
由 Petrik 提交于
Calling self in an action of a controller generates an endless stream of characters, including the request object and all instances variables. This can be frustrating when using a debugger in a controller and accidentally calling `self` generates output for a couple of seconds. This shortens inspect to only show the class name. MyController.new.inspect # => "#<MyController:0x00000000005028>"
-
由 Petrik 提交于
Calling request in an action of a controller generates an endless stream of characters, including the Rack app and middlewares. This can be frustrating when using a debugger in a controller and accidentally calling `request` generates output for a couple of seconds. Inspect on ActionDispatch::Request is shortened to the most relevant attributes and uses the same format as used for request in the logs: "#<ActionDispatch::Request POST "https://example.com/path/of/some/uri?q=1" for 1.2.3.4>"
-
- 05 9月, 2020 1 次提交
-
-
由 Kasper Timm Hansen 提交于
Reduce allocations in expanded_version and expanded_key
-
- 04 9月, 2020 11 次提交
-
-
由 Eileen M. Uchitelle 提交于
Disconnect connections used for acquiring advisory lock in migration.
-
由 Eileen M. Uchitelle 提交于
Raise error when `from` is used with `delete_all`.
-
由 Eileen M. Uchitelle 提交于
Avoid setting `ActiveRecord::Base.configurations` twice in db rake ta…
-
由 Guo Xiang Tan 提交于
This prevents the `from` query method from being ignored silently in the resulting SQL query that is generated.
-
由 Josh Goodall 提交于
The current behaviour of reverse_order, when presented with an existing order that is an Arel expression, is to ignore it. This isn't quite in keeping with how it handles Arel attributes (which it reverse) or arbitrary strings (which throw an exception). The easy path would be to throw an exception, but we don't have to. Any SQL expression that is a valid default sort expression can be reversed with DESC. It follows that if there's an existing Arel::Nodes::NodeExpression that is not already wrapped with an Arel::Nodes::Ordering, then it can be reversed with DESC.
-
由 Guo Xiang Tan 提交于
When ActiveRecord is used with Rails, loading `ActiveRecord` will set the configurations so there is no need to do it twice.
-
由 Ryuta Kamizono 提交于
Prefer bin/rails for the credentials command
-
由 Vipul A M 提交于
Clarify that exists? and find look in the table, not the unsaved collection [ci skip]
-
由 Eileen M. Uchitelle 提交于
Default db_config should be primary or first
-
由 Vinicius Stock 提交于
-
由 eileencodes 提交于
The handling for single database applications has always set a schema.rb or structure.sql files for loading the database schema. When we first implemented multiple database support we intended to keep this for the original, default database. Afterall Rails _has_ to connect to something on boot. In development only one connection is connected on boot since we don't eager load the app. Originally we had thought that all applications should be required to add a `primary` entry in the database configurations file. However, this hasn't worked in practice and we have some code now that does not assume there's a primary. The schema dumping/loading code however, still assumed there was a "primary" in the configurations file. We want the "default" database in any application to use the original files even when converted to a multiple database application as this reduces the need to make changes when implementing this functionality on an existing application. The changes here update Rails to ensure that we treat either "primary" or the first database configuration for an environment as "default". If there is a "primary" that will be used as the default configuration. If there is no primary the configuration that is first for an environment will be used as the default. For schema dump/load this means that the default configuration (primary or first) will use `schema.rb` as the filename and other configurations will use `[CONFIGURATION_NAME]_schema.rb`. This should also help us finish the pull request to infer migrations paths since now we can say the first configuration is the default. This is a natural assumption for application developers. Followup to #39536
-