| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Fixes regression ActionController::UnpermittedParameters not raised. The inner hook was being executed twice, once when ActionController::Base was loaded and again when ActionController::API was loaded. As options.delete operations inside the block are not idempotent, the second time it was run there was no configuration option available
|
|\
| |
| | |
Eager load controller actions to reduce response time of the first request
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
On the first request, ActionController::Base#action_methods computes
and memoized the list of available actions [1]. With this PR we move
this expensive operation into eager load step to reduce response time
of the first request served in production.
This also reduces the memory footprint when running on forking server
like Unicorn.
[1] https://github.com/rails/rails/blob/a3813dce9a0c950a4af7909111fa730a2622b1db/actionpack/lib/abstract_controller/base.rb#L66-L77
|
|/ |
|
|
|
|
|
|
|
|
| |
Rather than protecting from forgery in the generated
ApplicationController, add it to ActionController::Base by config. This
configuration defaults to false to support older versions which have
removed it from their ApplicationController, but is set to true for
Rails 5.2.
|
| |
|
|
|
|
|
|
|
| |
We need to configure it only when ActionController::Base is loaded
otherwise configs on initializers will not work.
Closes #29527.
|
| |
|
|
|
|
| |
[ci skip]
|
| |
|
| |
|
|\
| |
| |
| |
| |
| | |
Add always permitted parameters as a configurable option.
[Rafael Mendonça França + Gary S. Weaver]
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* This commit adds back the always_permitted_parameters
configuration option to strong paramaters.
* The initial pull requests where this feature was added
are the following:
- https://github.com/rails/rails/pull/12682
- https://github.com/rails/strong_parameters/pull/174
|
|/ |
|
|
|
|
| |
Move that part to AV railtie
|
|
|
|
|
|
| |
https://github.com/rails/rails/commit/cc1c3c5be061e7572018f734e5239750ab449e3f
Now instead of raise, we log by default in development and test
|
| |
|
|
|
|
| |
the discussion on https://github.com/rails/strong_parameters/pull/75.
|
|
|
|
| |
Also changed the exception to UnpermittedParameters
|
| |
|
|
|
|
| |
provided.
|
| |
|
|
|
|
|
| |
Sine page caching was remove from the core we don't have the
page_cache_directory anymore
|
|
|
|
| |
config.action_controller.permit_all_parameters is not present
|
|
|
|
| |
StrongParameters protection
|
|
|
|
|
|
|
| |
The new option allows any Ruby namespace to be registered and set
up for eager load. We are effectively exposing the structure existing
in Rails since v3.0 for all developers in order to make their applications
thread-safe and CoW friendly.
|
| |
|
|
|
|
|
|
| |
More info http://edgeguides.rubyonrails.org/api_app.html
[Carlos Antonio da Silva & Santiago Pastorino]
|
|
|
|
| |
We have an empty api doc page otherwise :)
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This makes "sprockets/railtie" explicit. This means that sprockets will
be loaded when you require "rails/all". If you are not using requiring
"rails/all", you need to manually load it with all other framework
railties.
In order to be complete, this commit also adds --skip-sprockets to
the rails generator.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
method_missing.
|
| |
|
|
|
|
| |
overhead.
|
|
|
|
| |
not DRY
|
|
|
|
| |
Signed-off-by: José Valim <jose.valim@gmail.com>
|
|
|
|
| |
use helper(:all) just after that
|
|
|
|
|
|
|
|
|
|
|
| |
This change is needed, because we must take namespace into account and if
controller's/mailer's class is namespaced, engine's paths should be set
instead of application's ones.
The nice side effect of this is removing unneeded logic in
ActionController::Base.inherited - now the helpers_path should be set
correctly even for engine's controllers, so helper(:all) will always
include correct helpers.
|
|
|
|
| |
ActionMailer::Railties::RoutesHelper to AbstractController::Railties::RoutesHelpers
|
|
|
|
| |
engine's ones for controllers inside isolated namespace
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
mounted_helpers are a bit similar to url_helpers. They're automatically
included in controllers for Rails.application and each of mounted
Engines. Mounted helper allows to call url_for and named helpers for
given application.
Given Blog::Engine mounted as blog_engine, there are 2 helpers defined:
app and blog_engine. You can call routes for app and engine using those
helpers:
app.root_url
app.url_for(:controller => "foo")
blog_engine.posts_path
blog_engine.url_for(@post)
|