aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/railtie
Commit message (Collapse)AuthorAgeFilesLines
* Enable `Layout/EmptyLinesAroundAccessModifier` copRyuta Kamizono2019-06-132-2/+0
| | | | | | | | | | | We sometimes say "✂️ newline after `private`" in a code review (e.g. https://github.com/rails/rails/pull/18546#discussion_r23188776, https://github.com/rails/rails/pull/34832#discussion_r244847195). Now `Layout/EmptyLinesAroundAccessModifier` cop have new enforced style `EnforcedStyle: only_before` (https://github.com/rubocop-hq/rubocop/pull/7059). That cop and enforced style will reduce the our code review cost.
* Clarify that config.eager_load controls eager loading [ci skip]Eugene Kenny2017-12-301-1/+1
| | | | | | | Before Rails 4.0, `config.cache_classes` determined whether application code was eager loaded. The `config.eager_load` option was introduced to allow the two behaviours to be configured independently, but this documentation was never updated to reflect that change.
* [Railties] require_relative => requireAkira Matsuda2017-10-211-1/+1
| | | | This basically reverts 618268b4b9382f4bcf004a945fe2d85c0bd03e32
* Adding frozen_string_literal pragma to Railties.Pat Allan2017-08-142-0/+4
|
* [Railties] require => require_relativeAkira Matsuda2017-07-011-1/+1
|
* Privatize unneededly protected methods in RailtiesAkira Matsuda2016-12-251-1/+1
|
* code gardening: removes redundant selfsXavier Noria2016-08-081-1/+1
| | | | | | | | | A few have been left for aesthetic reasons, but have made a pass and removed most of them. Note that if the method `foo` returns an array, `foo << 1` is a regular push, nothing to do with assignments, so no self required.
* normalizes indentation and whitespace across the projectXavier Noria2016-08-061-3/+3
|
* applies new string literal convention in railties/libXavier Noria2016-08-062-2/+2
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* Revert "Improve custom configuration"Rafael Mendonça França2014-08-191-36/+2
| | | | | | | | | This reverts commit de4891344ccc074f6d5693f4fac6ad610584e336. Conflicts: railties/lib/rails/railtie/configuration.rb It added regression. Will be back after the beta
* We always get the value so no need to check nil or HashRafael Mendonça França2014-08-191-6/+2
|
* Improve custom configurationRafael Mendonça França2014-08-191-2/+40
| | | | | | | | | | | | | | | | 1. Hashes can be assigned 2. We don't need a special level anymore The method chain only works in the top level. If users need a second level they need to assign a OrderedOptions to the key: config.resque.server = ActiveSupport::OrderedOptions.new config.resque.server.url = "http://localhost" config.resque.server.port = 3000 [Rafael Mendonça França + Carlos Antonio da Silva]
* update Rails::Railtie::Configuration and ↵Jon Kessler2013-08-161-1/+1
| | | | ActionDispatch::Response#respond_to? to accept include_private argument
* Use Ruby 1.9 Hash syntax in railtiesRobin Dupret2012-10-142-5/+5
|
* Get rid of config.preload_frameworks in favor of config.eager_load_namespacesJosé Valim2012-08-211-0/+10
| | | | | | | 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.
* Code-format references to config settingsMark Rushakoff2012-04-271-1/+1
|
* Speed up development by only reloading classes if dependencies files changed.José Valim2011-12-121-0/+12
| | | | | | | | This can be turned off by setting `config.reload_classes_only_on_change` to false. Extensions like Active Record should add their respective files like db/schema.rb and db/structure.sql to `config.watchable_files` if they want their changes to affect classes reloading. Thanks to https://github.com/paneq/active_reload and Pastorino for the inspiration. <3
* adds missing requireXavier Noria2011-06-071-0/+2
|
* Removing deprecated config.generators in Rails::RailtieGuillermo Iguaran2011-05-251-5/+0
|
* Remove the ability for engines to serve assets from the public directory.José Valim2011-04-151-7/+0
|
* Beef up Rails::Railtie::Configuration docsGabriel Horner2011-03-191-0/+8
|
* Railties typos.R.T. Lechow2011-03-051-1/+1
|
* Remove require AS::Concern from places where is already inSantiago Pastorino2010-12-191-2/+0
|
* Fix indentationSantiago Pastorino2010-12-191-3/+3
|
* Use Concern in Rails::Railtie::ConfigurableSantiago Pastorino2010-12-191-3/+3
|
* Be more explicit about what is deprecated.José Valim2010-10-021-1/+1
|
* Deprecate generators in Railties. You should use app_generators instead.José Valim2010-10-021-26/+6
|
* Added config.app_generators to allow configuring application's generators ↵Piotr Sarnacki2010-09-301-3/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | from railties. With config.generators becomes a way to configure generators for current instance only. For example: module Blog class Engine < Rails::Engine config.generators do |g| g.orm :active_record end config.app_generators do |g| g.test_framework :rspec end end end such definition sets :active_record as orm for engine and :rspec as test_framework for application. The values set with app_generators can be overwritten in application using config.generators as you would normally do: module MyApp class Application < Rails::Application config.generators do |g| g.test_framework :test_unit end end end
* Get rid of static_paths method and instead configure paths for ↵Piotr Sarnacki2010-09-031-0/+8
| | | | ActionDispatch::Static in initializers
* Move singleton pattern to Railtie and remove Engine::Configurable and ↵Piotr Sarnacki2010-09-031-7/+19
| | | | Application::Configurable in favor of unified Railtie::Configurable
* Engine can now serve files with ActionDispatch::StaticPiotr Sarnacki2010-09-031-1/+1
|
* Move AD::Cascade to the bottom of the middleware stack.José Valim2010-05-161-32/+1
|
* Expose remaining hooks to minimize the need for a Railtie based on feedback ↵José Valim2010-05-161-0/+12
| | | | from plugin developers.
* Reorganized initializers a bit to enable better hooks for common cases ↵wycats2010-05-151-6/+42
| | | | | | | | | | | | | | | without the need for Railtie. Specifically, the following hooks were added: * before_configuration: this hook is run immediately after the Application class comes into existence, but before the user has added any configuration. This is the appropriate place to set configuration for your plugin * before_initialize: This is run after all of the user's configuration has completed, but before any initializers have begun (in other words, it runs right after config/environments/{development,production,test}.rb) * after_initialize: This is run after all of the initializers have run. It is an appropriate place for forking in a preforking setup Each of these hooks may be used via ActiveSupport.on_load(name) { }. In all these cases, the context inside the block will be the Application object. This means that for simple cases, you can use these hooks without needing to create a Railtie.
* Move application configuration to the application configuration object, ↵José Valim2010-03-261-69/+8
| | | | remove railtie_name and engine_name and allow to set the configuration object.
* Move middlewares to the Application level. If you want to modify the ↵Carlhuda2010-03-081-4/+0
| | | | middleware, either use Rails.application.config.middleware or modify it in an initializer (if you need to set it relative to user-specified middleware).
* Deprecated ActionController::Base.session_options= and ↵Carlhuda2010-03-041-2/+32
| | | | ActionController::Base.session_store= in favor of a config.session_store method (which takes params) and a config.cookie_secret variable, which is used in various secret scenarios. The old AC::Base options will continue to work with deprecation warnings.
* Move session and session_store onto ActionDispatch and add deprecation warningsCarlhuda2010-03-041-2/+2
|
* No need for a module if it's only being included once into an empty class.Carl Lerche2010-03-041-1/+91
|
* Move configuration to subfolders.José Valim2010-01-232-1/+10
|
* Create configurable modules and ensure that they are added only on direct ↵José Valim2010-01-231-0/+23
children.