1. 21 4月, 2016 1 次提交
  2. 18 4月, 2016 1 次提交
  3. 27 3月, 2016 1 次提交
  4. 18 3月, 2016 1 次提交
  5. 01 2月, 2016 1 次提交
    • T
      clarify the touch true option does not trigger after_save/update [ci skip] · 8d25a8aa
      Tony Miller 提交于
      I've gotten tripped up more than a few times on this, thinking that
      using `belongs_to` with `touch: true` would trigger my after_save or
      after_update callbacks. The same text is in the documentation for the
      touch method itself, but I think its helpful to repeat it again here.
      It might save people some time.
      8d25a8aa
  6. 14 1月, 2016 1 次提交
  7. 18 12月, 2015 1 次提交
  8. 15 12月, 2015 2 次提交
    • M
      Use a real migration version number in docs · 97c77160
      Matthew Draper 提交于
      Even though this means more things to change when we bump after a
      release, it's more important that our examples are directly copyable.
      97c77160
    • M
      Use a deliberately-invalid migration version in all doc examples · c0af95e0
      Matthew Draper 提交于
      If we use a real version, at best that'll be an onerous update required
      for each release; at worst, it will encourage users to write new
      migrations against an older version than they're using.
      
      The other option would be to leave these bare, without any version
      specifier. But as that's just a variant spelling of "4.2", it would seem
      to raise the same concerns as above.
      c0af95e0
  9. 28 10月, 2015 1 次提交
  10. 25 10月, 2015 1 次提交
  11. 16 10月, 2015 1 次提交
  12. 14 10月, 2015 1 次提交
    • 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
  13. 13 10月, 2015 1 次提交
    • Y
      document `EagerLoadPolymorphicError`. [ci skip] · 6e2982fc
      Yves Senn 提交于
      This error is raised in certain situations when eager loading
      polymorphic associations. We even mention it in our docs. It should be
      included in our API.
      
      Conflicts:
      	activerecord/lib/active_record/associations.rb
      6e2982fc
  14. 16 9月, 2015 1 次提交
  15. 07 9月, 2015 1 次提交
  16. 30 7月, 2015 1 次提交
    • V
      RDoc: fix wrong model name `:inverse_of` with `:belongs_to` [ci skip] · 4ec818d2
      Vladimir Rybas 提交于
      There's a typo in ActiveRecord associations RDocs.
      Wrong `Taggable` model name, instead of `Tagging` in example of using
      option `:inverse_of` with `:belongs_to` association.
      
      Commit where typo was introduced:
      https://github.com/rails/rails/commit/91fd6510563f84ee473bb217bc63ed598abe3f24#diff-39001423802a8470dba9c931e66e101eR11
      
      First it appears in `activerecord/CHANGELOG` in example of `:inverse_of`
      usage:
      
      ```ruby
          class Post < ActiveRecord::Base
            has_many :taggings
            has_many :tags, :through => :taggings
          end
      
          class Tagging < ActiveRecord::Base
            belongs_to :post
            belongs_to :tag, :inverse_of => :tagging # :inverse_of must be set!
          end
      
          class Tag < ActiveRecord::Base
            has_many :taggings
            has_many :posts, :through => :taggings
          end
      
          post = Post.first
          tag = post.tags.build :name => "ruby"
      !>  tag.save # will save a Taggable linking to the post
      ```
      
      The last line should be
      
      ```ruby
          tag.save # will save a Tagging linking to the post
      ```
      
      The same typo appears in
      `activerecord/lib/active_record/associations.rb`.
      The association name is given as `:inverse_of => :taggings`, but class
      name is `Taggable`.
      
      ```ruby
          #   @post = Post.first
          #   @tag = @post.tags.build :name => "ruby"
          #   @tag.save
          #
      !>  # The last line ought to save the through record (a <tt>Taggable</tt>). This will only work if the
          # <tt>:inverse_of</tt> is set:
          #
      !>  #   class Taggable < ActiveRecord::Base
          #     belongs_to :post
      !>  #     belongs_to :tag, :inverse_of => :taggings
          #   end
      ```
      
      This PR fixes model name.
      4ec818d2
  17. 22 7月, 2015 1 次提交
  18. 13 6月, 2015 1 次提交
  19. 26 5月, 2015 2 次提交
  20. 20 5月, 2015 1 次提交
  21. 10 5月, 2015 1 次提交
  22. 09 5月, 2015 1 次提交
  23. 13 4月, 2015 1 次提交
  24. 07 4月, 2015 1 次提交
  25. 10 3月, 2015 1 次提交
  26. 25 2月, 2015 1 次提交
  27. 22 2月, 2015 1 次提交
  28. 18 2月, 2015 1 次提交
  29. 09 2月, 2015 1 次提交
  30. 07 2月, 2015 1 次提交
    • C
      Do not use the same name for two `:belongs_to` · 124d4d59
      claudiob 提交于
      A model cannot have two `:belongs_to` with the same exact name, so
      we are better off avoiding this code in our examples, which might
      mislead users in thinking it's admissible.
      
      [ci skip]
      124d4d59
  31. 01 2月, 2015 1 次提交
  32. 09 1月, 2015 1 次提交
  33. 31 12月, 2014 1 次提交
  34. 09 12月, 2014 1 次提交
  35. 29 11月, 2014 1 次提交
  36. 10 11月, 2014 1 次提交
  37. 15 10月, 2014 1 次提交
  38. 29 9月, 2014 1 次提交
    • B
      Isolate access to @associations_cache and @aggregations cache to the... · 9d569585
      Ben Woosley 提交于
      Isolate access to @associations_cache and @aggregations cache to the Associations and Aggregations modules, respectively.
      
      This includes replacing the `association_cache` accessor with a more
      limited `association_cached?` accessor and making `clear_association_cache`
      and `clear_aggregation_cache` private.
      9d569585