Commit Graph

53 Commits

Author SHA1 Message Date
Rafael Mendonça França
d6bf4de7dc
Transform actionpack documentation to Markdown 2024-02-09 22:28:15 +00:00
Jonathan Hefner
b287779499 Add {Abstract,Action}Controller.deprecator
This commit adds `AbstractController.deprecator` and
`ActionController.deprecator`, and replaces all usages of
`ActiveSupport::Deprecation.warn` in `actionpack/lib/action_controller`
with the latter.

Additionally, this commit adds `ActionController.deprecator` to
`Rails.application.deprecators`.  Because `AbstractController` does not
have its own railtie to do the same, `AbstractController` and
`ActionController` use the same deprecator instance.  Thus, both can be
configured via `Rails.application.deprecators[:action_controller]` or
via config settings such as `config.active_support.report_deprecations`.
2022-10-27 16:20:53 -05:00
Jean Boussier
2fd34270eb Eager load controllers view_context_class
These classes are relatively small, however they include lots of
modules as helpers. And if any of the included module hold constants
including it cause the global constant cache to be invalidated
which is really bad for performance.

So when eager loading is enabled we create all the possible classes
as part of the application boot.
2022-03-02 08:47:54 +01:00
Akira Matsuda
0126f60d16 Make sure to require active_support.rb before requiring active_support/rails.rb 2019-07-12 18:30:58 +09:00
Rafael Mendonça França
00638f31d1
Add autoload hook for AbstractController::ActionNotFound
The error can be reproduced with

    require "bundler/setup"
    require "action_controller"

    AbstractController::ActionNotFound
2018-11-28 14:21:19 -05:00
Kir Shatrov
dfcc766163 Use frozen string literal in actionpack/ 2017-07-29 14:02:40 +03:00
Matthew Draper
87b3e226d6 Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"
This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing
changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa.
2017-07-02 02:15:17 +09:30
Kir Shatrov
cfade1ec7e Enforce frozen string in Rubocop 2017-07-01 02:11:03 +03:00
Xavier Noria
628e51ff10 applies new string literal convention in actionpack/lib
The current code base is not uniform. After some discussion,
we have chosen to go with double quotes by default.
2016-08-06 18:51:43 +02:00
Rafael Mendonça França
40fa818580 Move Caching module to Abstract Controller
Abstract Controller is the common component between Action Mailer and
Action Controller so if we need to share the caching component it need
to be there.
2016-02-23 21:11:15 -03:00
Marcin Olichwirowicz
b69699afda Remove not used requires 2015-09-01 20:36:47 +02:00
Łukasz Strzałkowski
80b91610f8 No need for .rb extension 2013-08-25 11:39:09 +02:00
Łukasz Strzałkowski
8e3413d410 Create AbstractController::Rendering interface
This interface should be use when implementing renderers.
2013-08-25 11:39:09 +02:00
Łukasz Strzałkowski
c90971644a Revert "Rename abstract_controller/rendering. to errors.rb"
This reverts commit 6fe91ec5008838338e54ab8570f7c95ee0cdd8e8.
2013-08-25 11:39:08 +02:00
Łukasz Strzałkowski
cad8a20187 Rename abstract_controller/rendering. to errors.rb
Since all rendering stuff was extracted to AV, the only thing that left was single class with error so file name wasn't relevant anymore
2013-08-25 11:39:08 +02:00
Łukasz Strzałkowski
8c2c95e5d2 Fix AP test suite after moving stuff to AV 2013-08-25 11:39:08 +02:00
Łukasz Strzałkowski
c48ce6e73d Move layouts to AV 2013-08-25 11:39:07 +02:00
Łukasz Strzałkowski
5759531a95 Move rendering from AP to AV 2013-08-25 11:39:07 +02:00
Łukasz Strzałkowski
1b446d06dd Move view_paths from AP to AV 2013-08-25 11:39:07 +02:00
Xavier Noria
4aee8dd486 load active_support/core_ext/module/delegation in active_support/rails 2012-08-02 21:59:23 +02:00
Xavier Noria
5e1b92044c load active_support/core_ext/class/attribute in active_support/rails 2012-08-02 21:59:23 +02:00
Xavier Noria
64bc8447c2 load active_support/concern in active_support/rails 2012-08-02 21:59:23 +02:00
Xavier Noria
47396a9db8 load active_support/dependencies/autoload in active_support/rails 2012-08-02 21:59:23 +02:00
Xavier Noria
1a7b2e8fad defines a private require-hub active_support/rails
This is a private place to put those AS features that are used
by every component. Nowadays we cherry-pick individual files
wherever they are used, but that it is not worth the effort
for stuff that is going to be loaded for sure sooner or later,
like blank?, autoload, concern, etc.
2012-08-02 21:59:22 +02:00
Santiago Pastorino
36dd1857dc Remove useless load path modifications 2012-05-11 19:00:35 -03:00
Santiago Pastorino
a6381042fa Remove ruby/shim
require 'action_view' is now much faster
2012-05-11 19:00:11 -03:00
Piotr Sarnacki
79bd92b783 Refactor ActionMailer to not use hide_actions 2010-09-03 22:59:11 +02:00
José Valim
625f7b5a5b Be sure to call helper :all just on direct children. (Tests by Jesse Storimer) 2010-08-26 18:20:22 -03:00
José Valim
c565f0060a No need to delegate. Simply include the whole RecordIdentifier module. 2010-07-21 11:46:38 +02:00
David Heinemeier Hansson
631dc61885 Extract assets paths and make them available to Action Mailer as well 2010-06-02 16:49:02 -05:00
José Valim
4163ccec23 Clean up the config object in ActionPack. Create config_accessor which just delegates to the config object, reducing the number of deprecations and add specific tests. 2010-04-22 12:00:13 +02:00
José Valim
f2c0a353ae Finish cleaning up rendering stack from views and move assigns evaluation to controller (so plugins and/or controllers can overwrite just one method). 2010-03-12 20:39:53 +01:00
José Valim
07cf49aadf Optimize and clean up how details key get expired. 2010-03-10 22:13:29 +01:00
José Valim
67a6725bf9 Move ViewPaths module to its own file. 2010-03-08 16:50:10 +01:00
José Valim
4bae77a89b More cleanup on the layouts side. 2010-03-08 02:58:16 +01:00
José Valim
bd36418c51 Fix controller_path returnsing an empty string in Ruby 1.8.7 [#4036 status:resolved] 2010-02-26 11:51:21 +01:00
José Valim
df85ab41c1 Renamed LocalizedCache to DetailsCache. 2010-02-24 22:17:26 +01:00
José Valim
0e063f435c Fix some backward incompatible behavior on AM. 2010-01-30 16:35:22 +01:00
José Valim
3f84091937 ActionMailer should depend just on AbstractController. 2010-01-29 17:51:05 +01:00
José Valim and Mikel Lindsaar
ddfc0725a0 Added AbstractController::Collector. 2010-01-23 10:23:06 +01:00
José Valim
6e26be6960 Move ActionController::Translation to AbstractController::Translation. 2010-01-20 15:02:13 +01:00
José Valim
f564f947d9 Remove duplicated url_for code and move methods shared between ActionMailer and ActionController up to AbstractController. 2010-01-07 15:31:50 +01:00
Joshua Peek
ace20bd25e Flip deferrable autoload convention 2009-12-22 17:27:37 -06:00
David Heinemeier Hansson
83f4d86a93 Rename the RenderingController module to just plain Rendering 2009-12-20 17:15:31 -08:00
Yehuda Katz
8b4735fbd9 Add active_support/ruby/shim to the default requirements for AP components 2009-12-20 14:06:40 -08:00
Joshua Peek
7ee5843c3c Fully expand relative rails framework paths and make sure we aren't
adding any to the load path more than once.
2009-12-16 11:56:51 -06:00
Joshua Peek
9cc9949817 All AbstractController modules are deferrable 2009-12-12 19:28:03 -06:00
Joshua Peek
4b4e517bf1 Relocate AbstractController exceptions into their proper parent modules 2009-12-12 18:48:34 -06:00
Carlhuda
c1304098cc Reorganize autoloads:
* A new module (ActiveSupport::Autoload) is provide that extends
    autoloading with new behavior.
  * All autoloads in modules that have extended ActiveSupport::Autoload
    will be eagerly required in threadsafe environments
  * Autoloads can optionally leave off the path if the path is the same
    as full_constant_name.underscore
  * It is possible to specify that a group of autoloads live under an
    additional path. For instance, all of ActionDispatch's middlewares
    are ActionDispatch::MiddlewareName, but they live under 
    "action_dispatch/middlewares/middleware_name"
  * It is possible to specify that a group of autoloads are all found
    at the same path. For instance, a number of exceptions might all
    be declared there.
  * One consequence of this is that testing-related constants are not
    autoloaded. To get the testing helpers for a given component,
    require "component_name/test_case". For instance, "action_controller/test_case".
  * test_help.rb, which is automatically required by a Rails application's
    test helper, requires the test_case.rb for all active components, so
    this change will not be disruptive in existing or new applications.
2009-12-02 20:01:08 -08:00
José Valim
976c264724 Extracted localized_cache.rb from ActionController, added it to AbstractController and made ActionMailer use it. 2009-11-01 02:23:49 +01:00