1. 06 5月, 2015 1 次提交
  2. 03 5月, 2015 4 次提交
  3. 01 5月, 2015 2 次提交
  4. 30 4月, 2015 2 次提交
  5. 29 4月, 2015 1 次提交
  6. 28 4月, 2015 1 次提交
  7. 27 4月, 2015 5 次提交
  8. 24 4月, 2015 3 次提交
  9. 23 4月, 2015 1 次提交
  10. 22 4月, 2015 1 次提交
  11. 21 4月, 2015 1 次提交
    • A
      Rename association option :class to :anonymous_class · ac2b7a5c
      Andrew White 提交于
      In 1f006c an option was added called :class to allow passing anonymous
      classes to association definitions. Since using :class instead of
      :class_name is a fairly common typo even amongst experienced developers
      this can result in hard to debug errors arising in raise_on_type_mismatch?
      
      To fix this we're renaming the option from :class to :anonymous_class as
      that is a more correct description of what the option is for. Since this
      was an internal, undocumented option there is no need for a deprecation.
      
      Fixes #19659
      ac2b7a5c
  12. 20 4月, 2015 2 次提交
  13. 18 4月, 2015 1 次提交
    • S
      Autosave existing records on HMT associations when the parent is new · d849f42b
      Sean Griffin 提交于
      To me it seems like this should only be the case if `autosave: true` is
      set on the association. However, when implemented that way, it caused
      issues with has many associations, where we have explicit tests stating
      that child records are updated when the parent is new, even if autosave
      is not set (presumably to update the parent id, but other changed
      attributes would be persisted as well).
      
      It's quirky, but at least we should be consistently quirky. This
      constitutes a minor but subtle change in behavior, and therefore should
      not be backported to 4.2 and earlier.
      
      Fixes #19782
      d849f42b
  14. 17 4月, 2015 1 次提交
    • R
      Encourage users to user super to override methods. · 8f7d9eb0
      Richard Wilson 提交于
      IMO we shouldn't encourage users to use methods they shouldn't need to know about. As Song (in this example) inherits from ActiveRecord, we can use super here instead to get the same effect with the bonus of not knowing how active record actually implements these methods.
      8f7d9eb0
  15. 15 4月, 2015 3 次提交
    • J
      Fix typos and improve the documentation · 6345f31f
      Jon Atack 提交于
      This is a squash of the following commits, from first to last:
      
      -
      
      Fix minor, random things I’ve come across lately that individually
      did not seem worth making a PR for, so I saved them for one commit.
      
      One common error is using “it’s” (which is an abbreviation of “it is”)
      when the possessive “its” should be used for indicating possession.
      
      -
      
      Changes include the name of a test, so remove the `[skip ci]` (thanks @senny).
      
      -
      
      Line wrap the changes at 80 chars and add one more doc fix.
      
      -
      
      Add a missing line wrap in the Contributing to Ruby on Rails Guide.
      
      -
      
      Line wrap the `TIP` section in the Contributing to Ruby on Rails Guide as well.
      
      Rendering the guide locally with `bundle exec rake guides:generate` did
      not show any change in on-screen formatting after adding the line wrap.
      
      The HTML generated is (extra line added to illustrate where the line
      wrap takes place):
      
          <div class="info"><p>Please squash your commits into a single commit
      when appropriate. This
      
          simplifies future cherry picks and also keeps the git log
      clean.</p></div>
      
      -
      
      Squash commits.
      6345f31f
    • P
      Fix missing index when using timestamps with index · c0abeadc
      Paul Mucur 提交于
      The `index` option used with `timestamps` should be passed to both
      `column` definitions for `created_at` and `updated_at` rather than just
      the first.
      
      This was happening because `Hash#delete` is used to extract the `index`
      option passed to `timestamps`, thereby mutating the `options` hash
      in-place. Now take a copy of the `options` before deleting so that the
      original is not modified.
      c0abeadc
    • Y
      Revert "Merge pull request #19755 from yuki24/activerecord/support-for-set" · 5f00ed10
      Yves Senn 提交于
      This reverts commit 524d4059, reversing
      changes made to 34d3a609.
      
      Reasoning behind the revert are in the PR discussion:
      https://github.com/rails/rails/pull/19755
      
      - This means that types can no longer cast to/from `Set`, and reasonably
        work with `where` (we already have this problem for `array`/`json`
        types on pg)
      - This adds precedent for every other `Enumerable`, and we can't target
        `Enumerable` directly.
      - Calling `to_a` on a `Set` is reasonable.
      5f00ed10
  16. 14 4月, 2015 2 次提交
    • Y
      Add support for Set to Relation#where · 50cae600
      Yuki Nishijima 提交于
      Previously `#where` used to treat `Set`objects as nil, but now it treats
      them as an array:
      
        set = Set.new([1, 2])
        Author.where(:id => set)
        # => SELECT "authors".* FROM "authors" WHERE "authors"."id" IN (1, 2)
      50cae600
    • J
      Upgrade to Ruby 2.2.2 · 32f74918
      Jon Atack 提交于
      and fix the grammar in the ruby_version_check.rb user message.
      32f74918
  17. 13 4月, 2015 5 次提交
  18. 12 4月, 2015 1 次提交
  19. 11 4月, 2015 2 次提交
  20. 09 4月, 2015 1 次提交