aboutsummaryrefslogtreecommitdiffstats
path: root/railties
Commit message (Collapse)AuthorAgeFilesLines
...
* Use Bundler.with_clean_env instead of custom codePiotr Sarnacki2012-08-311-6/+3
|
* Revert "Revert changes related to `bundle install` fixes in `rails new`"Piotr Sarnacki2012-08-312-3/+17
| | | | | | | | The cause of the previous revert was bug in bundler that made it hard to make railties test work. Fix for bundler was recently pushed to github, so now we can safely get back to the original commit. This reverts commit 0f5cc34ab58cda99d1401ecc82e1ebb873838dd7.
* CHANGELOGs are now per branchXavier Noria2012-08-281-2479/+1
| | | | | | | | | | Changes in old branches needed to be manually synched in CHANGELOGs of newer ones. This has proven to be brittle, sometimes one just forgets this manual step. With this commit we switch to CHANGELOGs per branch. When a new major version is cut from master, the CHANGELOGs in master start being blank. A link to the CHANGELOG of the previous branch allows anyone interested to follow the history.
* Remove unused require.kennyj2012-08-292-3/+0
|
* Fixes wrong test class names.kennyj2012-08-294-4/+4
|
* Change generators controller help from singular to plural example.Philipp Weissensteiner2012-08-281-6/+6
| | | | | | | When running `rails generate controller --help` an example with creating a (singular) "CreditCard" controller is shown. The convention is to generate controllers with plural names though.
* Raise more helpful error message on missing gemPrem Sichanugrist2012-08-242-0/+26
| | | | | | Tell people to install `activerecord-session_store` gem when it's not installed instead ofraising `NameError` on missing `ActionDispatch::Session::ActiveRecordStore`.
* Remove meta Sesion Migration generatorPrem Sichanugrist2012-08-242-16/+0
|
* Extract ActiveRecord::SessionStore from RailsPrem Sichanugrist2012-08-245-55/+0
| | | | | This functionality will be available from gem `active_record-session_store` instead.
* Fix failure on middleware/exceptions_testJosé Valim2012-08-232-11/+5
| | | | | | | The reason the test was failing was because when the test invokes `app.config`, the app is loaded and, as `eager_load` is set to true, it disables the dependency loading mechanism, so controllers that are later defined are not loaded.
* Update the ducumentation about the before_eager_load callback [ci skip]Rafael Mendonça França2012-08-221-1/+1
|
* before_eager_load only runs when eager_load is trueRafael Mendonça França2012-08-221-4/+4
|
* edit secret token template comment [ci skip]Vijay Dev2012-08-231-1/+1
|
* remind user a good way to generate a secret code.Teng Siong Ong2012-08-211-0/+3
|
* Remove app building setup/teardown for remote ip railtie testsCarlos Antonio da Silva2012-08-211-14/+0
| | | | | These tests rely on "make_basic_app", which is a faster version that does not need to create the whole app directory structure.
* Set eager load option in "make_basic_app" for railties testsCarlos Antonio da Silva2012-08-211-0/+1
| | | | Avoid output with config option not set when running some tests.
* Merge pull request #7225 from rails/eager_loadJosé Valim2012-08-2116-57/+102
|\ | | | | Improve eager load on Rails
| * add Rack::Lock for webrickAaron Patterson2012-08-211-0/+9
| |
| * Deprecate config.threadsafe!José Valim2012-08-213-16/+14
| |
| * Get rid of config.preload_frameworks in favor of config.eager_load_namespacesJosé Valim2012-08-219-38/+18
| | | | | | | | | | | | | | 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.
| * Remove allow_concurrency as a flagJosé Valim2012-08-214-8/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The flag was mainly used to add a Rack::Lock middleware to the stack, but the only scenario the lock is desired is in development. If you are deploying on a not-threaded server, the Rack::Lock does not provide any benefit since you don't have concurrent accesses. On the other hand, if you are on a threaded server, you don't want the lock, since it defeats the purpose of using a threaded server. If there is someone out there, running on a thread server and does want a lock, it can be added to your environment as easy as: `use Rack::Lock`
| * Allow users to choose when to eager_load the application or not.José Valim2012-08-219-8/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, the eager load behavior was mostly coupled to config.cache_classes, however this was suboptimal since in some environments a developer may want to cache classes but not necessarily load them all on boot (for example, test env). This pull request also promotes the use of config.eager_load set to true by default in production. In the majority of the cases, this is the behavior you want since it will copy most of your app into memory on boot (which was also the previous behavior). Finally, this fix a long standing Rails bug where it was impossible to access a model in a rake task when Rails was set as thread safe.
* | Merge pull request #6499 from lazylester/patch-1Carlos Antonio da Silva2012-08-211-1/+1
|\ \ | |/ |/| | | Clarify and correct the description for the --full option of the plugin_new generator. [ci skip]
| * Clarify and correct the description for the --full option of the plugin_new ↵lazylester2012-08-211-1/+1
| | | | | | | | generator
* | fix punctuation in config templatesFrancesco Rodriguez2012-08-207-12/+12
| |
* | Update to activerecord-deprecated_finders on generatorMiguel Herranz2012-08-171-2/+2
| |
* | Merge branch 'master' of github.com:lifo/docrailsVijay Dev2012-08-161-2/+20
|\ \
| * | copy edits [ci skip]Vijay Dev2012-08-161-7/+6
| | |
| * | Add extra documentation to the locale file.Steve Klabnik2012-08-041-2/+21
| | |
* | | We don't need to require AS::TestCaseSteve Klabnik2012-08-141-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | This was only needed due to https://github.com/rails/rails/blob/6591a10b1f6eccc91bc01ab708050884058e9665/railties/lib/rails/console_app.rb#L6 We don't need that on master. Fixes #6907.
* | | oops, should be directoryAaron Patterson2012-08-131-1/+1
| | |
* | | speed up cache directory creationAaron Patterson2012-08-131-3/+9
| | | | | | | | | | | | | | | | | | Let Rake control the cache directories. If the directory already exists, rake will skip creating it (vs the previous task which would always try to mkdir_p)
* | | Move AD default_headers configurations to railtieGuillermo Iguaran2012-08-101-5/+0
| | | | | | | | | | | | | | | | | | ActionDispatch railtie is a better place for config.action_dispatch.default_headers settings, users can continue overriding those settings in their configuration files if needed.
* | | Fix handling SCRIPT_NAME from within mounted engine'sPiotr Sarnacki2012-08-114-16/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When you mount your application at a path, for example /myapp, server should set SCRIPT_NAME to /myapp. With such information, rails application knows that it's mounted at /myapp path and it should generate routes relative to that path. Before this patch, rails handled SCRIPT_NAME correctly only for regular apps, but it failed to do it for mounted engines. The solution was to hardcode default_url_options[:script_name], which is not the best answer - it will work only when application is mounted at a fixed path. This patch fixes the situation by respecting original value of SCRIPT_NAME when generating application's routes from engine and the other way round - when you generate engine's routes from application. This is done by using one of 2 pieces of information in env - current SCRIPT_NAME or SCRIPT_NAME for a corresponding router. This is because we have 2 cases to handle: - generating engine's route from application: in this situation SCRIPT_NAME is basically SCRIPT_NAME set by the server and it indicates the place where application is mounted, so we can just pass it as :original_script_name in url_options. :original_script_name is used because if we use :script_name, router will ignore generating prefix for engine - generating application's route from engine: in this situation we already lost information about the SCRIPT_NAME that server used. For example if application is mounted at /myapp and engine is mounted at /blog, at this point SCRIPT_NAME is equal /myapp/blog. Because of that we need to keep reference to /myapp SCRIPT_NAME by binding it to the current router. Later on we can extract it and use when generating url Please note that starting from now you *should not* use default_url_options[:script_name] explicitly if your server already passes correct SCRIPT_NAME to rack env. (closes #6933)
* | | remove some artifacts of dependent_restrict_raises that I missedJon Leighton2012-08-102-2/+0
| | |
* | | Remove the dependent_restrict_raises option.Jon Leighton2012-08-102-10/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's not really a good idea to have this as a global config option. We should allow people to specify the behaviour per association. There will now be two new values: * :dependent => :restrict_with_exception implements the current behaviour of :restrict. :restrict itself is deprecated in favour of :restrict_with_exception. * :dependent => :restrict_with_error implements the new behaviour - it adds an error to the owner if there are dependent records present See #4727 for the original discussion of this.
* | | introduce default_headers configEgor Homakov2012-08-091-0/+5
| | |
* | | Remove highly uncommon option for moving the manifest pathDavid Heinemeier Hansson2012-08-081-3/+0
| | |
* | | Observers are no longer important enough to get this configuration option ↵David Heinemeier Hansson2012-08-071-3/+0
| | | | | | | | | | | | called out at the top level
* | | make assertions easier to track downAaron Patterson2012-08-071-9/+17
| | |
* | | Revert "The application generator generates `public/humans.txt` with some ↵David Heinemeier Hansson2012-08-073-14/+0
| | | | | | | | | | | | basic data". I dont consider this something most people is going to want most of the time. If you want to add it in your own app, knock yourself out. But it doesnt belong in Rails imo
* | | removes usage of Object#in? from the code base (the method remains defined ↵Xavier Noria2012-08-066-14/+7
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | by Active Support) Selecting which key extensions to include in active_support/rails made apparent the systematic usage of Object#in? in the code base. After some discussion in https://github.com/rails/rails/commit/5ea6b0df9a36d033f21b52049426257a4637028d we decided to remove it and use plain Ruby, which seems enough for this particular idiom. In this commit the refactor has been made case by case. Sometimes include? is the natural alternative, others a simple || is the way you actually spell the condition in your head, others a case statement seems more appropriate. I have chosen the one I liked the most in each case.
* | Remove `:rails_env` task since it is not needed anymore.Rafael Mendonça França2012-08-021-7/+0
| |
* | Fix tests.Rafael Mendonça França2012-08-021-2/+2
| | | | | | | | | | Since b6ab4417720e03f1551abda2f1e4bd0a392dd04e the single quotes are being escaped in the templates.
* | The use_schema_cache_dump configuration moved to ActiveRecord.kennyj2012-08-021-2/+1
| |
* | Restoring documentation for env_config per #7070Justin Mazzi2012-08-011-0/+11
| |
* | Updated scaffold_controller generator docs #7146Aaron Cruz2012-07-311-4/+3
| | | | | | | | | | | | | | | | | | | | It was just a copy of the controller generator documentation which was misleading. It doesn't accept arguments for views. This seems more descriptive as well. Respect 80 char limit. #7147 Made a nicer paragraph #7147
* | Make ActiveSupport::Inflector locale aware and multilingualDavid Celis2012-07-301-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Inflector is currently not very supportive of internationalized websites. If a user wants to singularize and/or pluralize words based on any locale other than English, they must define each case in locale files. Rather than create large locale files with mappings between singular and plural words, why not allow the Inflector to accept a locale? This patch makes ActiveSupport::Inflector locale aware and uses `:en`` unless otherwise specified. Users will still be provided a list of English (:en) inflections, but they may additionally define inflection rules for other locales. Each list is kept separately and permanently. There is no reason to limit users to one list of inflections: ActiveSupport::Inflector.inflections(:es) do |inflect| inflect.plural(/$/, 's') inflect.plural(/([^aeéiou])$/i, '\1es') inflect.plural(/([aeiou]s)$/i, '\1') inflect.plural(/z$/i, 'ces') inflect.plural(/á([sn])$/i, 'a\1es') inflect.plural(/é([sn])$/i, 'e\1es') inflect.plural(/í([sn])$/i, 'i\1es') inflect.plural(/ó([sn])$/i, 'o\1es') inflect.plural(/ú([sn])$/i, 'u\1es') inflect.singular(/s$/, '') inflect.singular(/es$/, '') inflect.irregular('el', 'los') end 'ley'.pluralize(:es) # => "leyes" 'ley'.pluralize(:en) # => "leys" 'avión'.pluralize(:es) # => "aviones" 'avión'.pluralize(:en) # => "avións" A multilingual Inflector should be of use to anybody that is tasked with internationalizing their Rails application. Signed-off-by: David Celis <david@davidcelis.com>
* | Merge pull request #6991 from frodsan/performance_test_generatorRafael Mendonça França2012-07-242-2/+2
|\ \ | | | | | | update performance test template to use test method
| * | update performance test template to use test methodFrancesco Rodriguez2012-07-062-2/+2
| | |