1. 28 10月, 2015 1 次提交
  2. 25 10月, 2015 1 次提交
  3. 16 10月, 2015 1 次提交
  4. 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
  5. 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
  6. 16 9月, 2015 1 次提交
  7. 07 9月, 2015 1 次提交
  8. 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
  9. 22 7月, 2015 1 次提交
  10. 13 6月, 2015 1 次提交
  11. 26 5月, 2015 2 次提交
  12. 20 5月, 2015 1 次提交
  13. 10 5月, 2015 1 次提交
  14. 09 5月, 2015 1 次提交
  15. 13 4月, 2015 1 次提交
  16. 07 4月, 2015 1 次提交
  17. 10 3月, 2015 1 次提交
  18. 25 2月, 2015 1 次提交
  19. 22 2月, 2015 1 次提交
  20. 18 2月, 2015 1 次提交
  21. 09 2月, 2015 1 次提交
  22. 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
  23. 01 2月, 2015 1 次提交
  24. 09 1月, 2015 1 次提交
  25. 31 12月, 2014 1 次提交
  26. 09 12月, 2014 1 次提交
  27. 29 11月, 2014 1 次提交
  28. 10 11月, 2014 1 次提交
  29. 15 10月, 2014 1 次提交
  30. 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
  31. 23 9月, 2014 1 次提交
  32. 26 8月, 2014 1 次提交
  33. 25 8月, 2014 2 次提交
  34. 22 8月, 2014 2 次提交
  35. 21 8月, 2014 1 次提交
  36. 20 8月, 2014 1 次提交
  37. 19 8月, 2014 1 次提交
    • J
      Grammar pass · 20f7c767
      Jon Atack 提交于
      [ci skip]
      
      Add improvements from @eileencodes [skip ci]
      20f7c767