1. 11 2月, 2016 1 次提交
  2. 10 2月, 2016 1 次提交
  3. 14 10月, 2015 2 次提交
    • Y
      applies new doc guidelines to Active Record. · 428d47ad
      Yves Senn 提交于
      The focus of this change is to make the API more accessible.
      References to method and classes should be linked to make it easy to
      navigate around.
      
      This patch makes exzessiv use of `rdoc-ref:` to provide more readable
      docs. This makes it possible to document `ActiveRecord::Base#save` even
      though the method is within a separate module
      `ActiveRecord::Persistence`. The goal here is to bring the API closer to
      the actual code that you would write.
      
      This commit only deals with Active Record. The other gems will be
      updated accordingly but in different commits. The pass through Active
      Record is not completely finished yet. A follow up commit will change
      the spots I haven't yet had the time to update.
      
      /cc @fxn
      428d47ad
    • Y
      801371ab
  4. 27 9月, 2015 1 次提交
  5. 09 9月, 2015 1 次提交
  6. 23 8月, 2015 1 次提交
  7. 20 7月, 2015 1 次提交
  8. 18 7月, 2015 1 次提交
  9. 03 6月, 2015 1 次提交
    • R
      [ci skip] fix the `collection.clear` guide · efa1648f
      Roque Pinel 提交于
      Improve the guide about `has_many` `collection.clear` to indicate
      the behavior for each dependent strategy according to
      `collection.delete_all`.
      
      Based on #17179, I changed the `collection.delete` docs to also
      clarify the default strategy for each `hm` and `hm:t` associations.
      
      Fixes #20170.
      efa1648f
  10. 07 3月, 2015 1 次提交
  11. 28 2月, 2015 1 次提交
  12. 21 2月, 2015 1 次提交
  13. 02 1月, 2015 1 次提交
  14. 30 12月, 2014 1 次提交
  15. 27 12月, 2014 1 次提交
    • S
      Inject the `PredicateBuilder` into the `Relation` instance · 1d6bb776
      Sean Griffin 提交于
      Construction of relations can be a hotspot, we don't want to create one
      of these in the constructor. This also allows us to do more expensive
      things in the predicate builder's constructor, since it's created once
      per AR::Base subclass
      1d6bb776
  16. 04 10月, 2014 1 次提交
  17. 27 8月, 2014 4 次提交
  18. 07 4月, 2014 1 次提交
  19. 03 4月, 2014 1 次提交
  20. 22 1月, 2014 4 次提交
  21. 04 1月, 2014 1 次提交
  22. 11 12月, 2013 2 次提交
  23. 12 11月, 2013 1 次提交
  24. 24 10月, 2013 1 次提交
  25. 13 10月, 2013 1 次提交
  26. 22 8月, 2013 1 次提交
  27. 02 7月, 2013 1 次提交
  28. 30 6月, 2013 1 次提交
    • N
      Do not invoke callbacks when delete_all is called · f319e4a9
      Neeraj Singh 提交于
      Method `delete_all` should not be invoking callbacks and this
      feature was deprecated in Rails 4.0. This is being removed.
      `delete_all` will continue to honor the `:dependent` option. However
      if `:dependent` value is `:destroy` then the default deletion
      strategy for that collection will be applied.
      
      User can also force a deletion strategy by passing parameter to
      `delete_all`. For example you can do `@post.comments.delete_all(:nullify)`
      f319e4a9
  29. 28 6月, 2013 1 次提交
    • J
      Simplify/fix implementation of default scopes · 94924dc3
      Jon Leighton 提交于
      The previous implementation was necessary in order to support stuff
      like:
      
          class Post < ActiveRecord::Base
            default_scope where(published: true)
            scope :ordered, order("created_at")
          end
      
      If we didn't evaluate the default scope at the last possible moment
      before sending the SQL to the database, it would become impossible to
      do:
      
          Post.unscoped.ordered
      
      This is because the default scope would already be bound up in the
      "ordered" scope, and therefore wouldn't be removed by the
      "Post.unscoped" part.
      
      In 4.0, we have deprecated all "eager" forms of scopes. So now you must
      write:
      
          class Post < ActiveRecord::Base
            default_scope { where(published: true) }
            scope :ordered, -> { order("created_at") }
          end
      
      This prevents the default scope getting bound up inside the "ordered"
      scope, which means we can now have a simpler/better/more natural
      implementation of default scoping.
      
      A knock on effect is that some things that didn't work properly now do.
      For example it was previously impossible to use #except to remove a part
      of the default scope, since the default scope was evaluated after the
      call to #except.
      94924dc3
  30. 18 6月, 2013 1 次提交
  31. 13 5月, 2013 1 次提交
  32. 10 5月, 2013 1 次提交