1. 26 7月, 2015 2 次提交
  2. 25 7月, 2015 1 次提交
  3. 24 7月, 2015 6 次提交
    • S
      `destroy` shouldn't raise when child associations fail to save · d937a117
      Sean Griffin 提交于
      Deep down in the association internals, we're calling `destroy!` rather
      than `destroy` when handling things like `dependent` or autosave
      association callbacks. Unfortunately, due to the structure of the code
      (e.g. it uses callbacks for everything), it's nearly impossible to pass
      whether to call `destroy` or `destroy!` down to where we actually need
      it.
      
      As such, we have to do some legwork to handle this. Since the callbacks
      are what actually raise the exception, we need to rescue it in
      `ActiveRecord::Callbacks`, rather than `ActiveRecord::Persistence` where
      it matters. (As an aside, if this code wasn't so callback heavy, it
      would handling this would likely be as simple as changing `destroy` to
      call `destroy!` instead of the other way around).
      
      Since we don't want to lose the exception when `destroy!` is called (in
      particular, we don't want the value of the `record` field to change to
      the parent class), we have to do some additional legwork to hold onto it
      where we can use it.
      
      Again, all of this is ugly and there is definitely a better way to do
      this. However, barring a much more significant re-architecting for what
      I consider to be a reletively minor improvement, I'm willing to take
      this small hit to the flow of this code (begrudgingly).
      d937a117
    • S
      Merge pull request #20256 from arunagw/aa-remove-unused-rule-and-task-activerecord · cc214cff
      Sean Griffin 提交于
      Remove unused rule and task from activerecord
      cc214cff
    • M
      Merge pull request #20928 from matthewd/unload-interlock · 40ce686b
      Matthew Draper 提交于
      We need stricter locking before we can unload
      40ce686b
    • A
      Remove ivar only when defined · 430b7c8b
      Akira Matsuda 提交于
      this fixes a failing test case
      430b7c8b
    • C
      6a387824
    • R
      Improvements on the enum documentation [ci skip] · cdc32def
      Robin Dupret 提交于
      The note regarding the `_prefix` and `_suffix` options is no longer
      useful since they were renamed specifically for this purpose.
      
      Also the given example doesn't show what these options enable and in
      which case they are really useful (when there are conflicting values
      for instance).
      
      Refs #20999.
      
      [Godfrey Chan & Robin Dupret]
      cdc32def
  4. 23 7月, 2015 7 次提交
  5. 22 7月, 2015 8 次提交
  6. 21 7月, 2015 16 次提交