- 20 7月, 2016 1 次提交
-
-
由 Ryuta Kamizono 提交于
`binds` is an array of a query attribute since Active Record 5.0.
-
- 19 7月, 2014 1 次提交
-
-
由 Steve 提交于
-
- 17 4月, 2013 1 次提交
-
-
由 Xavier Noria 提交于
Closes #10198.
-
- 19 3月, 2013 1 次提交
-
-
由 Vipul A M 提交于
-
- 05 3月, 2013 1 次提交
-
-
由 kennyj 提交于
-
- 25 2月, 2013 1 次提交
-
-
由 Yves Senn 提交于
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.
-
- 26 11月, 2012 1 次提交
-
-
由 Blake Smith 提交于
-
- 26 10月, 2012 1 次提交
-
-
由 Jon Leighton 提交于
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.
-
- 21 10月, 2012 1 次提交
-
-
由 Jeremy Kemper 提交于
This reverts commit 83846838.
-
- 20 10月, 2012 1 次提交
-
-
由 Jon Leighton 提交于
I think it's going to be too much pain to try to transition the :active_record load hook from executing against Base to executing against Model. For example, after Model is included in Base, and modules included in Model will no longer get added to the ancestors of Base. So plugins which wish to be compatible with both Model and Base should use the :active_record_model load hook which executes *before* Base gets loaded. In general, ActiveRecord::Model is an advanced feature at the moment and probably most people will continue to inherit from ActiveRecord::Base for the time being.
-
- 03 8月, 2012 1 次提交
-
-
由 Xavier Noria 提交于
-
- 16 6月, 2012 1 次提交
-
-
由 Jon Leighton 提交于
Get rid of ActiveModel::Configuration, make better use of ActiveSupport::Concern + class_attribute, etc.
-
- 01 6月, 2012 2 次提交
-
-
由 Xavier Noria 提交于
-
由 Akira Matsuda 提交于
-
- 28 4月, 2012 1 次提交
-
-
由 Mark Rushakoff 提交于
-
- 26 1月, 2012 1 次提交
-
-
由 Xavier Noria 提交于
-
- 29 12月, 2011 1 次提交
-
-
由 Jon Leighton 提交于
The problem: We need to be able to specify configuration in a way that can be inherited to models that include ActiveRecord::Model. So it is no longer sufficient to put 'top level' config on ActiveRecord::Base, but we do want configuration specified on ActiveRecord::Base and descendants to continue to work. So we need something like class_attribute that can be defined on a module but that is inherited when ActiveRecord::Model is included. The solution: added ActiveModel::Configuration module which provides a config_attribute macro. It's a bit specific hence I am not putting this in Active Support or making it a 'public API' at present.
-
- 24 12月, 2011 1 次提交
-
-
由 Jon Leighton 提交于
auto_explain_threshold_in_seconds should be a global config option so it can be shared between AR::Base and AR::Model
-
- 17 12月, 2011 1 次提交
-
-
由 Xavier Noria 提交于
-
- 16 12月, 2011 1 次提交
-
-
由 Jon Leighton 提交于
-
- 05 12月, 2011 2 次提交
-
-
由 Xavier Noria 提交于
-
由 Xavier Noria 提交于
This commit vastly reduces the impact of auto explain logging when enabled, while keeping a negligible cost when disabled. The first implementation was based on the idea of subscribing to "sql.active_record" when needed, and unsubscribing once done. This is the idea behind AR::Relation#explain. Subscribe, collect, unsubscribe. But with the current implementation of notifications unsubscribing is costly, because it wipes an internal cache and that puts a penalty on the next event. So we are switching to an approach where a long-running subscriber is listening. Instead of collecting the queries with a closure in a dedicated subscriber, now we setup a thread local. If the feature is disabled by setting the threshold to nil, the subscriber will call a method that does nothing. That's totally cheap.
-
- 03 12月, 2011 5 次提交
-
-
由 Xavier Noria 提交于
Rationale: As discussed with José and Jon, this convenience shortcut is not clearly justified and it could let the user thing the disabled EXPLAINs are related to the model instance rather than being globally disabled.
-
由 Xavier Noria 提交于
-
由 Xavier Noria 提交于
-
由 Xavier Noria 提交于
-
由 Xavier Noria 提交于
-
- 02 12月, 2011 1 次提交
-
-
由 Xavier Noria 提交于
-