| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|/ /
| |
| |
| | |
Fix #18301
|
| |
| |
| |
| |
| | |
warning: ambiguous first argument; put parentheses or a space even after
`/' operator'`
|
| |
| |
| |
| | |
Thanks @robin850.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Changes `rails g model Post user:references` from
def change
create_table :posts do |t|
t.references :user, index: true
end
add_foreign_key :posts, :users
end
to
def change
create_table :posts do |t|
t.references :user, index: true, foreign_key: true
end
end
Changes `rails g migration add_user_to_posts user:references` from
def change
add_reference :posts, :users, index: true
add_foreign_key :posts, :users
end
to
def change
add_reference :posts, :users, index: true, foreign_key: true
end
|
| |
| |
| |
| |
| |
| | |
The changes in #18149 added tests for the app generator, but only fixed
it for the plugin generator (I should have let CI finish though I think
it would have failed as an allowed failure).
|
| | |
|
| |
| |
| |
| |
| |
| | |
Allow static asset serving from env variable (enhanced!)
Conflicts:
railties/CHANGELOG.md
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Closes #17945
`db:test:prepare` still purges the database to always keep the test
database in a consistent state.
This patch introduces new problems with `db:schema:load`. Prior
to the introduction of foreign-keys, we could run this file against
a non-empty database. Since every `create_table` containted the
`force: true` option, this would recreate tables when loading the schema.
However with foreign-keys in place, `force: true` wont work anymore and
the task will crash.
/cc @schneems
|
| | |
|
|\ \
| | |
| | | |
fixing mailer previews for apps with globbing route
|
| | | |
|
|\ \ \
| | | |
| | | | |
Test coverage for ActiveJob generator
|
| | | | |
|
|\ \ \ \
| | | | |
| | | | | |
Don't remove mailer layouts files
|
| | | | | |
|
| |_|/ /
|/| | | |
|
| | | | |
|
| |/ /
|/| |
| | |
| | |
| | |
| | |
| | |
| | | |
Fixes https://github.com/rails/rails/issues/17340.
Use Minitest::BacktraceFilter instead of removing all silencers. This
will allow the backtrace for all libraries in the plugin to be shown
while removing noise generated by Minitest's backtrace.
|
|\ \ \
| | | |
| | | | |
Bugfix config.action_view.default_form_builder option
|
| |/ / |
|
|\ \ \
| | | |
| | | | |
Pure rack apps can be mounted with a name
|
| |/ /
| | |
| | |
| | | |
See https://github.com/rails/rails/commit/9b15828b5c347395b42066a588c88e5eb4e72279#commitcomment-8764492
|
|/ / |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
If you run a generator such as:
```
rails generate model accounts supplier:references
```
The resulting migration will now add the corresponding foreign key
constraint unless the reference was specified to be polymorphic.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This reverts deprecations added in #13528.
The task is brought back for two reasons:
1. Give plugins a way to hook into the test database initialization process
2. Give the user a way to force a test database synchronization
While `test:prepare` is still a dependency of every test task, `db:test:prepare`
no longer hooks into it. This means that `test:prepare` runs before the schema
is synchronized. Plugins, which insert data can now hook into `db:test:prepare`.
The automatic schema maintenance can't detect when a migration is rolled-back,
modified and reapplied. In this case the user has to fall back to `db:test:prepare`
to force the synchronization to happen.
|
| |
| |
| |
| |
| |
| | |
The tests to verify our testing setup used `RAILS_ENV=development`
to execute the tests. Let's keep it as close to a real-world setup
as possible.
|
| |
| |
| |
| |
| |
| | |
Closes #17756
[Godfrey Chan, Zachary Scott]
|
| |
| |
| |
| | |
This removes the unwanted deprecation warnings in the tests
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This is a follow-up to 116de07. That change was for two reasons: 1) speed up the
tests by reducing the amount of log lines 2) avoid a deprecation warning from
a6de6f5.
This setting need to be on the basic app too, otherwise the deprecation warning
will show up on other unrelated test cases.
|
|\ \
| | |
| | | |
Always default the log_level to :info for Railties
|
| | | |
|
| | | |
|
| | | |
|
|/ /
| |
| |
| | |
tags to reduce spam score
|
| | |
|
| |
| |
| |
| | |
Just prefer secrets over config
|
|\ \
| | |
| | |
| | | |
Allow fallback to LegacyKeyGenerator when secret_key_base is not set but secrets.secret_token is
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
- `secrets.secret_token` is now used in all places `config.secret_token` was
- `secrets.secret_token`, when not present in `config/secrets.yml`,
now falls back to the value of `config.secret_token`
- when `secrets.secret_token` is set, it over-writes
`config.secret_token` so they are the same (for backwards-compatibility)
- Update docs to reference app.secrets in all places
- Remove references to `config.secret_token`, `config.secret_key_base`
- Warn that missing secret_key_base is deprecated
- Add tests for secret_token, key_generator, and message_verifier
- the legacy key generator is used with the message verifier when
secrets.secret_key_base is blank and secret_token is set
- app.key_generator raises when neither secrets.secret_key_base nor
secret_token are set
- app.env_config raises when neither secrets.secret_key_base nor
secret_token are set
- Add changelog
Run focused tests via
ruby -w -Itest test/application/configuration_test.rb -n '/secret_|key_/'
|
| | | |
|
| | | |
|
|/ /
| |
| |
| |
| |
| |
| |
| | |
db:fixtures:load"
This reverts commit 482fdad5ef8a73688b50bba3991dd4ef6f286edd.
Fixes #17237.
|
|\ \
| | |
| | | |
Fix rbx generated Gemfile regex
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
https://travis-ci.org/rails/rails/jobs/39190983#L460
1) Failure:
AppGeneratorTest#test_psych_gem
[test/generators/app_generator_test.rb:495]:
Expected /gem 'psych',\s+'~> 2.0', \s+platforms: :rbx/ to match <snip>
http://git.io/uuLVag)\ngem 'psych', '~> 2.0', platforms: :rbx\n\n
|
|\ \ \
| |/ /
|/| | |
UrlGenerationError are not catched as 404 anymore
|