aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails.rb
Commit message (Collapse)AuthorAgeFilesLines
* moves a require to the file that needs itXavier Noria2019-03-081-1/+0
|
* Allow autoloader inflectors to be swaped outJean Boussier2019-03-081-0/+1
|
* Replace autoloader accessors with Rails.autoloaders.{main,once}Xavier Noria2019-02-141-17/+2
| | | | | | | | | | | | | | | | Rails.autoloader and Rails.once_autoloader was just tentative API good enough for a first patch. Rails.autoloader is singular and does not convey in its name that there is another autoloader. That might be confusing, for example if you set a logger and miss traces. On the other hand, the name `once_autoloader` is very close to being horrible. Rails.autoloaders.main and Rails.autoloaders.once read better for my taste, and have a nice symmetry. Also, both "main" and "once" are four letters long, short and same length. They are tagged as "rails.main" and "rails.once", respectively. References #35235.
* Zeitwerk integrationXavier Noria2019-02-121-0/+20
|
* [Railties] require_relative => requireAkira Matsuda2017-10-211-4/+4
| | | | This basically reverts 618268b4b9382f4bcf004a945fe2d85c0bd03e32
* Adding frozen_string_literal pragma to Railties.Pat Allan2017-08-141-0/+2
|
* [Railties] require => require_relativeAkira Matsuda2017-07-011-4/+4
|
* Fix the example code for `Rails.groups` [ci skip]Ryunosuke Sato2017-03-301-2/+2
| | | | `Rails.groups` contains `Rails.env` that is inspected as String.
* Rails.env falls back to dev mode when env var is emptyDaniel Deng2017-01-041-1/+2
|
* Add missing `+` around a some literals.bogdanvlviv2016-10-271-2/+2
| | | | | | Mainly around `nil` [ci skip]
* AS => Active Support [ci skip]Santosh Wadghule2016-09-251-1/+1
|
* applies new string literal convention in railties/libXavier Noria2016-08-061-12/+12
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* rails -> Rails [ci skip]Santosh Wadghule2016-07-121-3/+3
|
* better docs for Rails.root and Rails.public_pathTravis Yoder2015-05-071-0/+10
|
* Revert "Merge pull request #19404 from dmathieu/remove_rack_env"Jeremy Kemper2015-03-201-1/+1
| | | | | | | Preserving RACK_ENV behavior. This reverts commit 7bdc7635b885e473f6a577264fd8efad1c02174f, reversing changes made to 45786be516e13d55a1fca9a4abaddd5781209103.
* don't fallback to RACK_ENV when RAILS_ENV is not presentDamien Mathieu2015-03-191-1/+1
|
* Remove some comments about Ruby 1.9 behaviorsRafael Mendonça França2015-01-041-1/+1
|
* Add docs for `Rails.env` and `Rails.env=`claudiob2014-12-221-0/+8
| | | | [ci skip]
* lazily instantiate application subclassesAaron Patterson2014-08-061-1/+7
| | | | this means we can meaningfully override methods in the subclass
* Introduce `Rails.gem_version`Prem Sichanugrist2014-03-051-4/+0
| | | | | | | | | | | | | | | | | | | This method return `Gem::Version.new(Rails.version)`, suggesting a more reliable way to perform version comparison. Example: Rails.version #=> "4.1.2" Rails.gem_version #=> #<Gem::Version "4.1.2"> Rails.version > "4.1.10" #=> false Rails.gem_version > Gem::Version.new("4.1.10") #=> true Gem::Requirement.new("~> 4.1.2") =~ Rails.gem_version #=> true This was originally introduced as `.version` by @charliesome in #8501 but got reverted in #10002 since it was not backward compatible. Also, updating template for `rake update_versions`.
* Add mailer previews feature based on mail_view gemAndrew White2013-12-171-0/+1
|
* Removed unused deprecation requires.Paul Nikitochkin2013-07-031-1/+0
|
* Refactor of ::Rails moduleGenadi Samokovarov2013-06-121-12/+10
| | | | | | | 1. Used ActiveSupport::Autoload to dry-up the autoload definitions. 2. Used ActiveSupport's delegate to dry up the application proxied attributes. 3. Did a little white space change on Rails.groups.
* reverts changes to Rails.version made in #8501Charlie Somerville2013-03-301-0/+4
|
* remove references to *::VERSION, replace with *.versionCharlie Somerville2013-03-211-4/+0
|
* Move background jobs to the 'jobs' branch until fully baked. Not shipping ↵Jeremy Kemper2012-12-211-19/+0
| | | | with Rails 4.0.
* Revert "Make sure that RAILS_ENV is set when accessing Rails.env"Andy Lindeman2012-12-211-4/+1
| | | | | | | | This reverts commit b3125c89f42968bec6ee0b92ab93e36dbc36d5c3. * It is not desirable to set `ENV['RAILS_ENV']`; otherwise, it will leak through to rake tasks such as `rake test` or `rake spec`. See #7175 for more details.
* Use Rails to Render Default Index Pageschneems2012-12-101-1/+2
| | | | | | | | | | | | | | | This is an alternative implementation to #7771 thanks to the advice of @spastorino Rails is a dynamic framework that serves a static index.html by default. One of my first questions ever on IRC was solved by simply deleting my public/index.html file. This file is a source of confusion when starting as it over-rides any set "root" in the routes yet it itself is not listed in the routes. By making the page dynamic by default we can eliminate this confusion. This PR moves the static index page to an internal controller/route/view similar to `rails/info`. When someone starts a rails server, if no root is defined, this route will take over and the "dynamic" index page from rails/welcome_controller will be rendered. These routes are only added in development. If a developer defines a root in their routes, it automatically takes precedence over this route and will be rendered, with no deleting of files required. In addition to removing this source of confusion for new devs, we can now use Rails view helpers to build and render this page. While not the primary intent, the added value of "dogfooding" should not be under-estimated. The prior PR #7771 had push-back since it introduced developer facing files. This PR solves all of the same problems, but does not have any new developer facing files (it actually removes one). cc/ @wsouto, @dickeyxxx, @tyre, @ryanb, @josevalim, @maxim, @subdigital, @steveklabnik ATP Railties and Actionpack.
* Use attr_accessor for Rails.{application,cache,logger}Bjørn Arild Mæland2012-12-011-23/+1
|
* Make sure that RAILS_ENV is set when accessing Rails.envSteve Klabnik2012-10-311-1/+4
| | | | Fixes #8025
* Use Ruby 1.9 Hash syntax in railtiesRobin Dupret2012-10-141-1/+1
|
* Make Rails.public_path return a PathnamePrem Sichanugrist2012-10-021-1/+1
|
* Move queue classes to ActiveSupportSantiago Pastorino2012-09-141-1/+0
|
* Removing ==Examples and last blank lines of docs from railtiesFrancesco Rodriguez2012-05-141-3/+0
|
* Initial queue implementationYehuda Katz2012-04-261-0/+20
|
* Class variables has been fixed to Singleton instance variables at Rails moduleRoman V. Babenko2012-04-061-7/+7
|
* Rails.initialized? can be called at any time without raising an exception ↵Franck Verrot2012-03-281-5/+1
| | | | | | | | | | [Closes #2507] Changes: * `Rails.initialized=` has been removed * `Rails.initialized?` and `Rails.application.initialized?` are now * delegating to `MyApp::Application.initialized?`
* Deprecate RAILS_CACHE constant.kennyj2012-01-181-1/+6
|
* Get rid of more 1.8.x dead codeJosé Valim2011-12-201-12/+3
|
* * BufferedLogger is deprecated. Use ActiveSupport::Logger, or the loggerAaron Patterson2011-12-191-1/+0
| | | | from Ruby stdlib.
* we are *sure* we want to set the encoding, so silence warnings around itAaron Patterson2011-08-241-2/+4
|
* Changed a few instances of of words in the API docs written in British ↵Oemuer Oezkir2011-07-241-1/+1
| | | | | | English to American English(according to Weber)
* Make Rails.groups accept arrays.José Valim2011-07-101-3/+6
|
* Add Rails.groups to encapsulate available groups for require.José Valim2011-06-211-0/+23
|
* Provide a cleaner syntax for paths configuration that does not rely on ↵José Valim2010-10-061-1/+1
| | | | method_missing.
* Removed most of deprecated stuff from Application and EnginePiotr Sarnacki2010-09-031-5/+0
|
* Remove constants deprecation.José Valim2010-08-291-1/+0
|
* Move Rails::LogSubscriber to ActiveSupport::LogSubscriber, allowing ↵José Valim2010-06-241-1/+0
| | | | frameworks like ActiveRecord and ActiveResource to log outsude Rails::Application [#4816 state:resolved]
* edit pass: the names of Rails components have a space, ie, "Active Record", ↵Xavier Noria2010-06-141-1/+1
| | | | not "ActiveRecord"
* Single ruby version requirement messageJeremy Kemper2010-06-111-1/+2
|