1. 20 7月, 2016 1 次提交
  2. 19 7月, 2014 1 次提交
  3. 17 4月, 2013 1 次提交
  4. 19 3月, 2013 1 次提交
  5. 05 3月, 2013 1 次提交
  6. 25 2月, 2013 1 次提交
    • Y
      remove AR auto-explain (config.auto_explain_threshold_in_seconds) · d3688e02
      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.
      d3688e02
  7. 26 11月, 2012 1 次提交
  8. 26 10月, 2012 1 次提交
    • J
      Remove ActiveRecord::Model · 9e4c41c9
      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.
      9e4c41c9
  9. 21 10月, 2012 1 次提交
  10. 20 10月, 2012 1 次提交
    • J
      Get rid of the ActiveRecord::Model::DeprecationProxy thing. · 83846838
      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.
      83846838
  11. 03 8月, 2012 1 次提交
  12. 16 6月, 2012 1 次提交
  13. 01 6月, 2012 2 次提交
  14. 28 4月, 2012 1 次提交
  15. 26 1月, 2012 1 次提交
  16. 29 12月, 2011 1 次提交
    • J
      Support configuration on ActiveRecord::Model. · 93c1f11c
      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.
      93c1f11c
  17. 24 12月, 2011 1 次提交
  18. 17 12月, 2011 1 次提交
  19. 16 12月, 2011 1 次提交
  20. 05 12月, 2011 2 次提交
    • X
    • X
      implements a much faster auto EXPLAIN, closes #3843 [José Valim & Xavier Noria] · cfeac38e
      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.
      cfeac38e
  21. 03 12月, 2011 5 次提交
  22. 02 12月, 2011 1 次提交