| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | |
|
|/ |
|
|
|
|
|
|
| |
Also edited the copy to be more consistent with `rake routes`.
See #19323.
|
|
|
|
|
|
|
| |
Preserving RACK_ENV behavior.
This reverts commit b19990c82c6a9beff0cd058dc2ff67894a2f9ea7, reversing
changes made to ac291b76ea770b5795c767f2f74a8d0b33744809.
|
|
|
|
| |
[ci skip]
|
|
|
|
|
|
|
|
| |
Fix regression on route method that was added by
bac812a7ef2660a2fe2ab00822e5e66228379822. The regression was that when
calling the `route` method, we were not appending a \n anymore.
[fixes #19316]
|
|
|
|
|
| |
This task prints out initializers for an application. It is useful to
develop a rubygem which involves the initialization process.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This introduces undesirable `Rails.logger` formatters (such as the syslog
formatter) onto a `Logger.new(STDERR)` for the console. The production
logger may be going elsewhere than standard io, so we can't presume to
reuse its formatter.
With syslog, this causes missing newlines in the console, so irb prompts
start at the end of the last log message.
We can work to expose the console formatter in another way to address
the original issue.
This reverts commit 026ce5ddf11c4cda0aae7f33a9266e54117db318, reversing
changes made to 6f0a69c5899ebdc892e2aa23e68e2604fa70fb73.
|
|
|
|
|
|
| |
Fixes #18876. Rake restart touches `tmp/restart.txt` to restart
application on next request. Updated tests and documentation
accordingly.
|
|\
| |
| |
| | |
Use logger environment settings in Rails console.
|
| |
| |
| |
| | |
Deprecate `required` option in favor of `optional` for belongs_to.
|
| |
| |
| |
| | |
Fixes: https://github.com/rails/rails/issues/16433.
|
| |
| |
| |
| |
| |
| | |
README.rdoc was generated to support the doc:app task. Now that
this task is gone we can switch to Markdown, which is nowadays
a better default.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This patch removes the tasks doc:app, doc:rails, and doc:guides.
In our experience applications do not generate APIs using doc:app.
Methods may be certainly documented for maintainers, annotated
with YARD tags, etc. but that is intended to be read with the
source code, not in a separate website. Then, teams also have
typically selected topics written down in Markdown files, or in
a GitHub wiki... that kind of thing.
If a team absolutely needs to generate application documentation
for internal purposes, they can still easily write their own task.
Regarding doc:rails and doc:guides, we live in 2015. We are used
to go to online docs all the time. If you really want access to the
API offline RubyGems generates it for every Rails component unless
you tell it not to, and you can checkout the Rails source code to
read the guides as Markdown, or download them for a Kindle reader.
All in all, maintaining this code does not seem to be worthwhile
anymore.
As a consequence of this, guides (+3 MB uncompressed) won't be
distributed with the rails gem anymore. Of course, guides and API
are going to be still part of releases, since documentation is
maintained alongside code and tests.
Also, time permitting, this will allow us to experiment with novel
ways to generate documentation in the Rails docs server, since
right now we were constrained by being able to generate them in
the user's environment.
|
| |
| |
| |
| |
| |
| |
| | |
Thor isn't very discerning over whether some content is present when passed
to `inject_into_file`, e.g. a commented out route is detected as being present.
So to prevent people scratching their heads as to why a route hasn't appeared
it's better to fall on the side of having duplicate routes.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When there is a single scaffold in the routes.rb with no other lines
then revoking/destroying it will create a routes.rb file with a syntax
error. This is because the sentinel for the Thor `route` action didn't
include the newline but the logged route code did.
The fix is to add the newline to the sentinel and remove it from the
the logged route code.
Fixes #15913.
|
| |
| |
| |
| | |
Rails no longer generates Test::Unit files by default.
|
| |
| |
| |
| | |
Fixes #18473
|
| |
| |
| |
| |
| | |
- test/functional
- test/unit
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | | |
Use local variables in _form.html.erb generated by scaffold.
Conflicts:
railties/CHANGELOG.md
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
It seems a good idea to use local variables in generated partials instead of using instance variables.
Before
<%= render 'form' %>
After
<%= render 'form', product: @product %>
|
|\ \ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Introduce explicit way of halting callback chains by throwing :abort. Deprecate current implicit behavior of halting callback chains by returning `false` in apps ported to Rails 5.0. Completely remove that behavior in brand new Rails 5.0 apps.
Conflicts:
railties/CHANGELOG.md
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This stems from [a comment](rails#17227 (comment)) by @dhh.
In summary:
* New Rails 5.0 apps will not accept `return false` as a way to halt callback chains, and will not display a deprecation warning.
* Existing apps ported to Rails 5.0 will still accept `return false` as a way to halt callback chains, albeit with a deprecation warning.
For this purpose, this commit introduces a Rails configuration option:
```ruby
config.active_support.halt_callback_chains_on_return_false
```
For new Rails 5.0 apps, this option will be set to `false` by a new initializer
`config/initializers/callback_terminator.rb`:
```ruby
Rails.application.config.active_support.halt_callback_chains_on_return_false = false
```
For existing apps ported to Rails 5.0, the initializers above will not exist.
Even running `rake rails:update` will not create this initializer.
Since the default value of `halt_callback_chains_on_return_false` is set to
`true`, these apps will still accept `return true` as a way to halt callback
chains, displaying a deprecation warning.
Developers will be able to switch to the new behavior (and stop the warning)
by manually adding the line above to their `config/application.rb`.
A gist with the suggested release notes to add to Rails 5.0 after this
commit is available at https://gist.github.com/claudiob/614c59409fb7d11f2931
|
|/ / /
| | |
| | |
| | |
| | | |
Generated fixtures won't use parent_id when generated with
parent:references
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We will support only Ruby >= 2.1.
But right now we don't accept pull requests with syntax changes to drop
support to Ruby 1.9.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | | |
why not gitignore /log as a whole?
[ci skip]
|
| | | |
|
|\ \ \
| | | |
| | | | |
Fix Rails::Paths::Path.unshift interface
|
| | | | |
|
|\ \ \ \
| |/ / /
|/| | | |
simplify rake test vs rake test:all
|
| | | |
| | | |
| | | |
| | | | |
Renames `rake test:all` to `rake test` by changing old `rake test:run` to previous version of `rake test:all`. Removes old definition of `rake test`. Also renames `rake test:all:db` to `rake test:db` and deprecates `rake test:all` & `rake test:all:db`
|
|\ \ \ \
| | | | |
| | | | |
| | | | | |
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_/'
|
|/ / / /
| | | |
| | | |
| | | | |
[ci skip]
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | | |
For the most part of cases --skip-gems option just remove one line in
the Gemfile. This is not worth for the complexity it adds.
Closes #17196
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
This seems to be the style settled on in most of the templates.
|
|\ \ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Specify dummy app's db migrate path in plugin's test_helper.rb
Conflicts:
railties/CHANGELOG.md
|
| | | | |
|