1. 01 6月, 2016 7 次提交
    • S
      Make Active Record emit significantly smaller YAML · c4cb6862
      Sean Griffin 提交于
      This reduces the size of a YAML encoded Active Record object by ~80%
      depending on the number of columns. There were a number of wasteful
      things that occurred when we encoded the objects before that have
      resulted in numerous wins
      
      - We were emitting the result of `attributes_before_type_cast` as a hack
        to work around some laziness issues
      - The name of an attribute was emitted multiple times, since the
        attribute objects were in a hash keyed by the name. We now store them
        in an array instead, and reconstruct the hash using the name
      - The types were included for every attribute. This would use backrefs
        if multiple objects were encoded, but really we don't need to include
        it at all unless it differs from the type at the class level. (The
        only time that will occur is if the field is the result of a custom
        select clause)
      - `original_attribute:` was included over and over and over again since
        the ivar is almost always `nil`. We've added a custom implementation
        of `encode_with` on the attribute objects to ensure we don't write the
        key when the field is `nil`.
      
      This isn't without a cost though. Since we're no longer including the
      types, an object can find itself in an invalid state if the type changes
      on the class after serialization. This is the same as 4.1 and earlier,
      but I think it's worth noting.
      
      I was worried that I'd introduce some new state bugs as a result of
      doing this, so I've added an additional test that asserts mutation not
      being lost as the result of YAML round tripping.
      
      Fixes #25145
      c4cb6862
    • J
      Remove unused require and unused model stub · b351061b
      Jon Moss 提交于
      - The `Project` model should have been removed in 46893929.
      - The superfluous require was added in 605c6455.
      
      Closes #25215
      Signed-off-by: NJeremy Daer <jeremydaer@gmail.com>
      b351061b
    • J
      Merge pull request #25170 from maclover7/add-configuration-cable · 8932c1b9
      Jeremy Daer 提交于
      [Action Cable] Add `WebSocket` and `logger` configuration options
      8932c1b9
    • J
      410a32ff
    • J
      Reorganize `MockWebSocket` · fb0f0c7f
      Jon Moss 提交于
      fb0f0c7f
    • J
      Add configuration for `WebSocket` and `logger` · 66901c18
      Jon Moss 提交于
      [Javan Makhmali, Jon Moss]
      66901c18
    • S
      Respect options passed to `foreign_key` when reverting `add_reference` · 56a61e0c
      Sean Griffin 提交于
      The code incorrectly assumes that the option was written as
      `foreign_key: true`, but that is not always the case. This now mirrors
      the behavior of reverting `add_foreign_key`. The code was changed to use
      kwargs while I was touching it, as well.
      
      This could really use a refactoring to go through the same code paths as
      `add_refernce` in the future, so we don't duplicate default values.
      
      Fixes #25169
      56a61e0c
  2. 31 5月, 2016 18 次提交
  3. 30 5月, 2016 4 次提交
  4. 29 5月, 2016 10 次提交
  5. 28 5月, 2016 1 次提交