aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails.rb
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* Revert "Moved encoding work in progress to a feature branch."wycats2010-05-171-0/+1
| | | | This reverts commit ade756fe42423033bae8e5aea8f58782f7a6c517.
* Moved encoding work in progress to a feature branch.Jeremy Kemper2010-05-161-1/+0
| | | | This reverts commits af0d1a88157942c6e6398dbf73891cff1e152405 and 64d109e3539ad600f58536d3ecabd2f87b67fd1c.
* Significantly improved internal encoding heuristics and support.wycats2010-05-161-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | * Default Encoding.default_internal to UTF-8 * Eliminated the use of file-wide magic comments to coerce code evaluated inside the file * Read templates as BINARY, use default_external or template-wide magic comments inside the Template to set the initial encoding * This means that template handlers in Ruby 1.9 will receive Strings encoded in default_internal (UTF-8 by default) * Create a better Exception for encoding issues, and use it when the template source has bytes that are not compatible with the specified encoding * Allow template handlers to opt-into handling BINARY. If they do so, they need to do some of their own manual encoding work * Added a "Configuration Gotchas" section to the intro Rails Guide instructing users to use UTF-8 for everything * Use config.encoding= in Ruby 1.8, and raise if a value that is an invalid $KCODE value is used Also: * Fixed a few tests that were assert() rather than assert_equal() and were caught by Minitest requiring a String for the message * Fixed a test where an assert_select was misformed, also caught by Minitest being more restrictive * Fixed a test where a Rack response was returning a String rather than an Enumerable
* Fix a bug in ActionDispatch::Static where Rails cannot find assets if ↵José Valim2010-04-081-2/+3
| | | | started in another directory which is not the RAILS_ROOT.
* Adding Rails.env= to railties to allow changing of rails env on the fly for ↵Mikel Lindsaar2010-04-081-0/+4
| | | | | | rake tasks etc Signed-off-by: José Valim <jose.valim@gmail.com>
* Autoload Rails::InfoJoshua Peek2010-03-201-0/+3
|
* Rename Rails::Subscriber to Rails::LogSubscriberPrem Sichanugrist2010-02-161-1/+1
|