1. 21 7月, 2015 7 次提交
  2. 20 7月, 2015 18 次提交
  3. 19 7月, 2015 10 次提交
  4. 18 7月, 2015 5 次提交
    • T
    • S
      Ensure cyclic associations w/ autosave don't cause duplicate errors · 7550f0a0
      Sean Griffin 提交于
      This code is so fucked. Things that cause this bug not to replicate:
      
      - Defining the validation before the association (we end up calling
        `uniq!` on the errors in the autosave validation)
      - Adding `accepts_nested_attributes_for` (I have no clue why. The only
        thing it does that should affect this is adds `autosave: true` to the
        inverse reflection, and doing that manually doesn't fix this).
      
      This solution is a hack, and I'm almost certain there's a better way to
      go about it, but this shouldn't cause a huge hit on validation times,
      and is the simplest way to get it done.
      
      Fixes #20874.
      7550f0a0
    • S
      Merge pull request #20763 from maurogeorge/default_scope_create-doc · 2a0a264b
      Sean Griffin 提交于
      Add a note about default_scope and create records [ci skip]
      2a0a264b
    • S
      Ensure that `ActionController::Parameters` can still be passed to AR · 68af6361
      Sean Griffin 提交于
      Since nested hashes are also instances of
      `ActionController::Parameters`, and we're explicitly looking to work
      with a hash for nested attributes, this caused breakage in several
      points.
      
      This is the minimum viable fix for the issue (and one that I'm not
      terribly fond of). I can't think of a better place to handle this at the
      moment. I'd prefer to use some sort of solution that doesn't special
      case AC::Parameters, but we can't use something like `to_h` or `to_a`
      since `Enumerable` adds both.
      
      While I've added a trivial test case for verifying this fix in
      isolation, we really need better integration coverage to prevent
      regressions like this in the future. We don't actually have a lot of
      great places for integration coverage at the moment, so I'm deferring it
      for now.
      
      Fixes #20922.
      68af6361
    • S
      Merge pull request #20930 from prathamesh-sonpatki/rm-render-text · c7449a22
      Sean Griffin 提交于
       Replaced render :text with render :plain in AC gem bug report template
      c7449a22