1. 22 9月, 2012 1 次提交
  2. 16 9月, 2012 1 次提交
  3. 29 8月, 2012 1 次提交
  4. 28 7月, 2012 1 次提交
  5. 21 7月, 2012 1 次提交
    • J
      rm unnecessary test · 2f6e33d3
      Jon Leighton 提交于
      interpolation is no longer a thing separate from "normal" assoc
      conditions.
      2f6e33d3
  6. 20 7月, 2012 1 次提交
  7. 27 4月, 2012 1 次提交
  8. 26 4月, 2012 1 次提交
  9. 22 3月, 2012 1 次提交
    • J
      Deprecate eager-evaluated scopes. · 0a12a5f8
      Jon Leighton 提交于
      Don't use this:
      
          scope :red, where(color: 'red')
          default_scope where(color: 'red')
      
      Use this:
      
          scope :red, -> { where(color: 'red') }
          default_scope { where(color: 'red') }
      
      The former has numerous issues. It is a common newbie gotcha to do
      the following:
      
          scope :recent, where(published_at: Time.now - 2.weeks)
      
      Or a more subtle variant:
      
          scope :recent, -> { where(published_at: Time.now - 2.weeks) }
          scope :recent_red, recent.where(color: 'red')
      
      Eager scopes are also very complex to implement within Active
      Record, and there are still bugs. For example, the following does
      not do what you expect:
      
          scope :remove_conditions, except(:where)
          where(...).remove_conditions # => still has conditions
      0a12a5f8
  10. 06 3月, 2012 1 次提交
  11. 09 12月, 2011 1 次提交
  12. 30 11月, 2011 1 次提交
  13. 05 9月, 2011 1 次提交
  14. 03 6月, 2011 1 次提交
  15. 24 5月, 2011 1 次提交
  16. 19 4月, 2011 1 次提交
  17. 18 4月, 2011 1 次提交
  18. 13 4月, 2011 3 次提交
  19. 17 3月, 2011 1 次提交
  20. 06 3月, 2011 1 次提交
  21. 18 2月, 2011 2 次提交
  22. 14 2月, 2011 1 次提交
  23. 08 2月, 2011 1 次提交
  24. 04 1月, 2011 1 次提交
    • J
      Let AssociationCollection#find use #scoped to do its finding. Note that I am... · 3103296a
      Jon Leighton 提交于
      Let AssociationCollection#find use #scoped to do its finding. Note that I am removing test_polymorphic_has_many_going_through_join_model_with_disabled_include, since this specifies different behaviour for an association than for a regular scope. It seems reasonable to expect scopes and association proxies to behave in roughly the same way rather than having subtle differences.
      3103296a
  25. 23 12月, 2010 1 次提交
  26. 21 12月, 2010 2 次提交
  27. 16 12月, 2010 3 次提交
  28. 31 10月, 2010 1 次提交
  29. 20 10月, 2010 2 次提交
  30. 19 10月, 2010 1 次提交
  31. 10 10月, 2010 1 次提交
  32. 14 8月, 2010 2 次提交