1. 08 11月, 2016 1 次提交
  2. 07 11月, 2016 4 次提交
  3. 06 11月, 2016 5 次提交
  4. 05 11月, 2016 10 次提交
  5. 04 11月, 2016 4 次提交
  6. 03 11月, 2016 1 次提交
  7. 02 11月, 2016 14 次提交
    • A
      Use tr instead of gsub · 7b0b119c
      Akira Matsuda 提交于
      7b0b119c
    • G
      Merge pull request #26951 from y-yagi/fix_ruby_warning · da23e125
      Guillermo Iguaran 提交于
      remove warning from railtie
      da23e125
    • Y
      remove warning from railtie · 34530f5b
      yuuji.yaginuma 提交于
      This removes the following warnings.
      
      ```ruby
      rails/railties/lib/rails/railtie.rb:186: warning: instance variable @rake_tasks not initialized
      rails/railties/lib/rails/railtie.rb:186: warning: instance variable @rake_tasks not initialized
      rails/railties/lib/rails/railtie.rb:186: warning: instance variable @load_console not initialized
      rails/railties/lib/rails/railtie.rb:186: warning: instance variable @rake_tasks not initialized
      ```
      34530f5b
    • S
      fix datatime error · 9bf45832
      Sen-Zhang 提交于
      9bf45832
    • A
      Make `register_block_for` private · 9ebb3558
      Arthur Neves 提交于
      9ebb3558
    • S
      Merge pull request #26950 from bouk/exclude-dbmigrate · 7bb28a0d
      Sean Griffin 提交于
      Don't put db:migrate and db:setup in binfiles if activerecord is excluded
      7bb28a0d
    • B
    • S
      Merge pull request #26451 from kamipo/remove_target_uniq_size · 4e8f1ba2
      Sean Griffin 提交于
      Remove unnecessary `target.uniq.size` in `CollectionAssociation#size`
      4e8f1ba2
    • S
      Merge pull request #26453 from kamipo/remove_unused_internal_dependent_option · 8632efd8
      Sean Griffin 提交于
      Remove unused internal `:dependent` option in `CollectionAssociation#delete`
      8632efd8
    • S
      Allow `autosave: true` to be used with inverse of · c7adc610
      Sean Griffin 提交于
      With the changes in #25337, double save bugs are pretty much impossible,
      so we can just lift this restriction with pretty much no change. There
      were a handful of cases where we were relying on specific quirks in
      tests that had to be updated. The change to has_one associations was due
      to a particularly interesting test where an autosaved has_one
      association was replaced with a new child, where the child failed to
      save but the test wanted to check that the parent id persisted to `nil`.
      
      I think this is almost certainly the wrong behavior, and I may change
      that behavior later. But ultimately the root cause was because we never
      remove the parent in memory when nullifying the child. This makes #23197
      no longer needed, but it is what we'll do to fix some issues on 5.0
      
      Close #23197
      c7adc610
    • S
      Merge pull request #25337 from sgrif/sg-changes-in-callbacks · 29b3b5dd
      Sean Griffin 提交于
      Deprecate the behavior of AR::Dirty inside of after_(create|update|save) callbacks
      29b3b5dd
    • S
      Deprecate the behavior of AR::Dirty inside of after_(create|update|save) callbacks · 16ae3db5
      Sean Griffin 提交于
      We pretty frequently get bug reports that "dirty is broken inside of
      after callbacks". Intuitively they are correct. You'd expect
      `Model.after_save { puts changed? }; model.save` to do the same thing as
      `model.save; puts model.changed?`, but it does not.
      
      However, changing this goes much farther than just making the behavior
      more intuitive. There are a _ton_ of places inside of AR that can be
      drastically simplified with this change. Specifically, autosave
      associations, timestamps, touch, counter cache, and just about anything
      else in AR that works with callbacks have code to try to avoid "double
      save" bugs which we will be able to flat out remove with this change.
      
      We introduce two new sets of methods, both with names that are meant to
      be more explicit than dirty. The first set maintains the old behavior,
      and their names are meant to center that they are about changes that
      occurred during the save that just happened. They are equivalent to
      `previous_changes` when called outside of after callbacks, or once the
      deprecation cycle moves.
      
      The second set is the new behavior. Their names imply that they are
      talking about changes from the database representation. The fact that
      this is what we really care about became clear when looking at
      `BelongsTo.touch_record` when tests were failing. I'm unsure that this
      set of methods should be in the public API. Outside of after callbacks,
      they are equivalent to the existing methods on dirty.
      
      Dirty itself is not deprecated, nor are the methods inside of it. They
      will only emit the warning when called inside of after callbacks. The
      scope of this breakage is pretty large, but the migration path is
      simple. Given how much this can improve our codebase, and considering
      that it makes our API more intuitive, I think it's worth doing.
      16ae3db5
    • A
      Merge PR #26052 · 4a8edc0d
      Arthur Neves 提交于
      4a8edc0d
    • R
      Added register_block method to register rake_tasks, generators, console & runner blocks · 8360d994
      Rafael Fidelis 提交于
      fixing @generators var initialization
      
      pre initializing variables values
      
      Changing from var init to symbol to instance var get/set
      8360d994
  8. 01 11月, 2016 1 次提交