aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/railtie.rb
Commit message (Collapse)AuthorAgeFilesLines
* let the sqlite task run without railsDamien Mathieu2013-08-071-0/+1
|
* Remove deprecation messages about protected_attributes and rails-observersCarlos Antonio da Silva2013-07-011-39/+0
|
* remove auto-explain-config deprecation warningYves Senn2013-07-011-11/+0
|
* Setup env and seed_loaded for DatabaseTasks outside load_configPiotr Sarnacki2013-06-231-2/+3
| | | | Those vars can be used in tasks, which not call load_config.
* Change a way ActiveRecord's config is prepared for rake tasksPiotr Sarnacki2013-06-231-10/+14
| | | | | | | | | | | | | | | | In commit d1d7c86d0 I moved setting migrations paths into activerecord's railtie to remove Rails dependency on databases.rake. However, it introduced a regression, ENGINE_PATH was not available at the moment, so engine's migrations where not added properly to paths. Fix was added at 97a4a771, but it changes a way things work from using ENGINE_PATH to APP_RAKEFILE. Additionally, the config runs when the code loads, while previously it ran in the db:load_config rake task In order to make it more in pair with original version this commit changes the config to run only on load_config task. This code uses the fact that defining a task in rake does not overwrite, but only appends. It also allows to get back to checking for ENGINE_PATH
* Check if APP_RAKEFILE is definedPiotr Sarnacki2013-05-161-1/+1
|
* Fix detection of engine in rake db:load_configJoel Cogen2013-05-161-1/+1
| | | | Broken by d1d7c86d0c8dcb7e75a87644b330c4e9e7d6c1c1
* Don't require Rails.env in order to use AR::Tasks::DatabaseTasksPiotr Sarnacki2013-04-241-0/+1
|
* Use DatabaseTasks.fixtures_path instead of FIXTURES_PATH in db.rakePiotr Sarnacki2013-04-241-0/+1
| | | | | | This will allow to set fixtures path in global config easier, it should be not needed to use FIXTURES_PATH every time user wants to load fixtures.
* Don't require having Rails.application to run database tasksPiotr Sarnacki2013-04-241-0/+12
|
* MOAR cleanups.Vipul A M2013-03-141-3/+3
|
* Remove hard coded references to Active Record in railtiesJosé Valim2013-03-021-1/+1
|
* remove AR auto-explain (config.auto_explain_threshold_in_seconds)Yves Senn2013-02-241-9/+13
| | | | | | | | | | We discussed that the auto explain feature is rarely used. This PR removes only the automatic explain. You can still display the explain output for any given relation using `ActiveRecord::Relation#explain`. As a side-effect this should also fix the connection problem during asset compilation (#9385). The auto explain initializer in the `ActiveRecord::Railtie` forced a connection.
* standardize database_configuration to a hashTerence Lee2013-02-211-3/+1
| | | | | | | make connection_url_to_hash a class method This als prevents loading database.yml if it doesn't exist but DATABASE_URL does
* Point to guides.rubyonrails.org instead of edgeguides.rubyonrails.orgSantiago Pastorino2012-12-301-2/+2
|
* Fix typo in the Observers deprecation message. [ci skip]Lucas Mazza2012-11-281-1/+1
|
* Gracefully handle upgrading apps with observersRafael Mendonça França2012-11-281-0/+12
| | | | | | Rather than just raising a NoMethodError when copying the config, this commit adds a warning message until either the rails-observers gem is installed or the relevant config options are removed.
* Remove observers and sweepersRafael Mendonça França2012-11-281-10/+0
| | | | | | | | They was extracted from a plugin. See https://github.com/rails/rails-observers [Rafael Mendonça França + Steve Klabnik]
* Don't run explain on slow queries for database adapters that don't support itBlake Smith2012-11-261-0/+7
|
* only clear caches if we are actually connected to the databaseAaron Patterson2012-11-121-2/+4
|
* Gracefully handle upgrading apps with mass assigment configsAndrew White2012-11-091-0/+27
| | | | | | | | Most apps upgrading from 3.x will have options for mass assigment in their application.rb and environments/*.rb config files. Rather than just raising a NoMethodError when copying the config, this commit adds a warning message until either the protected_attributes gem is installed or the relevant config options are removed.
* Remove ActiveRecord::ModelJon Leighton2012-10-261-6/+5
| | | | | | | | | | In the end I think the pain of implementing this seamlessly was not worth the gain provided. The intention was that it would allow plain ruby objects that might not live in your main application to be subclassed and have persistence mixed in. But I've decided that the benefit of doing that is not worth the amount of complexity that the implementation introduced.
* Should use app.paths instead of specific path.kennyj2012-10-081-1/+2
|
* Merge branch 'master' of github.com:lifo/docrailsVijay Dev2012-09-281-2/+2
|\ | | | | | | | | Conflicts: actionpack/lib/action_view/helpers/asset_tag_helper.rb
| * nodoc AR::Railtie [ci skip]Francesco Rodriguez2012-09-211-2/+2
| |
* | make clear that expired db/schema_cache.dump are ignoredXavier Noria2012-09-241-1/+1
|/
* removed warning: shadowing outer local variableArun Agrawal2012-09-091-1/+1
|
* Get rid of config.preload_frameworks in favor of config.eager_load_namespacesJosé Valim2012-08-211-0/+3
| | | | | | | 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.
* The use_schema_cache_dump configuration moved to ActiveRecord.kennyj2012-08-021-15/+21
|
* Fix observers with AR::ModelJon Leighton2012-06-151-3/+4
|
* Fix config.active_record.whitelist_attributes with AR::ModelJon Leighton2012-06-151-3/+0
|
* Simplify AR configuration code.Jon Leighton2012-06-151-2/+2
| | | | | Get rid of ActiveModel::Configuration, make better use of ActiveSupport::Concern + class_attribute, etc.
* refactorJon Leighton2012-06-151-11/+5
|
* raise error for pending migration schneems2012-06-091-0/+7
| | | can be configured by setting config.active_record.migration. Setting to :page_load will raise an error on each page refresh if there are migrations that are pending. Setting to :page_load is defaulted in development for new applications.
* Fix #5847 and #4045 on master.kennyj2012-05-301-0/+2
|
* Use runner hook to load ActiveRecord::Base.kennyj2012-05-301-0/+4
|
* Revert "Merge pull request #5995 from kennyj/fix_5847-3"José Valim2012-04-271-5/+0
| | | | | | | | Active Record should be lazy loaded and this pull request forced Active Record to always be loaded after initialization. This reverts commit 8cd14c0bc9f9429f03d1181912355d2f48b98157, reversing changes made to 2f0c8c52e66f1a2a3d1c00efc207f227124e96c2.
* Fix #5847 and #4045. Load AR::Base before loading an application model.kennyj2012-04-261-0/+5
|
* DATABASE_URL allows omission of database.ymlTim Pope2012-04-031-1/+3
|
* use File.binread to pull in the schema cacheAaron Patterson2012-04-031-1/+1
|
* Remove IdentityMapCarlos Antonio da Silva2012-03-131-5/+0
|
* Support judgement expired schema cache dump.kennyj2012-03-011-1/+5
|
* Load db/schema_cache.dump duaring boot time.kennyj2012-03-011-1/+12
|
* pushed broadcasting down to a moduleAaron Patterson2012-01-201-2/+1
|
* restored logging to the log file and display on the consoleAaron Patterson2012-01-201-1/+3
|
* Moved all the logger methods to active support loggerKarunakar (Ruby)2012-01-061-1/+1
| | | | minor
* Avoid deprecation warningJon Leighton2011-12-281-1/+1
|
* Clean up the cache before the request in case we are running in the ↵José Valim2011-12-151-5/+13
| | | | reload_classes_only_on_change schema.
* FileUpdateChecker should be able to handle deleted files.José Valim2011-12-131-2/+1
|
* Speed up development by only reloading classes if dependencies files changed.José Valim2011-12-121-0/+5
| | | | | | | | 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