1. 09 3月, 2018 1 次提交
  2. 06 3月, 2018 3 次提交
    • F
      Fix dependence on has_one/belongs_to relationships · a286c32c
      Fernando Gorodscy 提交于
      When a class has a belongs_to or has_one relationship with dependent: :destroy
      option enabled, objects of this class should not be deleted if it's dependents
      cannot be deleted.
      
      Example:
      
          class Parent
            has_one :child, dependent: :destroy
          end
      
          class Child
            belongs_to :parent, inverse_of: :child
            before_destroy { throw :abort }
          end
      
          c = Child.create
          p = Parent.create(child: c)
      
          p.destroy
      
          p.destroyed? # expected: false; actual: true;
      
      Fixes #32022
      a286c32c
    • X
      whitelist NULLS { FIRST | LAST } in order clauses · 6c82b6c9
      Xavier Noria 提交于
      6c82b6c9
    • R
      Fix that after commit callbacks on update does not triggered when optimistic locking is enabled · 263f01d9
      Ryuta Kamizono 提交于
      This issue is caused by `@_trigger_update_callback` won't be updated due
      to `_update_record` in `Locking::Optimistic` doesn't call `super` when
      optimistic locking is enabled.
      
      Now optimistic locking concern when updating is supported by
      `_update_row` low level API, therefore overriding `_update_record` is no
      longer necessary.
      
      Removing the method just fix the issue.
      
      Closes #29096.
      Closes #29321.
      Closes #30823.
      263f01d9
  3. 05 3月, 2018 2 次提交
  4. 04 3月, 2018 2 次提交
  5. 02 3月, 2018 1 次提交
  6. 28 2月, 2018 1 次提交
  7. 27 2月, 2018 3 次提交
  8. 26 2月, 2018 3 次提交
  9. 23 2月, 2018 4 次提交
  10. 22 2月, 2018 3 次提交
    • A
      Properly escape column name embedded into regexp · d53b259a
      Andreas Bühmann 提交于
      SQLServerAdapter (gem `activerecord-sqlserver-adapter`) uses square
      brackets for quoting column names (e.g. `[id]`). Those brackets must not
      be misinterpreted in regular expressions.
      
      Failure:
      Expected /SELECT [developers].[id].* FROM developers/ to match "SELECT [developers].[id], [developers].[name], [developers].[salary], [developers].[firm_id], [developers].[mentor_id], [developers].[created_at], [developers].[updated_at], [developers].[created_on], [developers].[updated_on] FROM developers".
      d53b259a
    • A
      9c0c9097
    • E
      Delete default configuration · bf0495de
      eileencodes 提交于
      Because of this default configuration we're constantly checking if the
      database exists when looping through configurations. This is unnecessary
      and we should just delete it before we need to loop through
      configurations.
      bf0495de
  11. 19 2月, 2018 1 次提交
  12. 18 2月, 2018 3 次提交
    • R
      Make `reflection.klass` raise if `polymorphic?` not to be misused · fb86ecd6
      Ryuta Kamizono 提交于
      This is an alternative of #31877 to fix #31876 caused by #28808.
      
      This issue was caused by a combination of several loose implementation.
      
      * finding automatic inverse association of polymorphic without context (caused by #28808)
      * returning `klass` even if `polymorphic?` (exists before #28808)
      * loose verification by `valid_inverse_reflection?` (exists before #28808)
      
      This makes `klass` raise if `polymorphic?` not to be misused.
      This issue will not happen unless polymorphic `klass` is misused.
      
      Fixes #31876.
      Closes #31877.
      fb86ecd6
    • R
      Association scope's own order should be prioritized over through scope's order · 5c6d6fd3
      Ryuta Kamizono 提交于
      3acc5d6e was changed the order of scope evaluation from through scope to
      the association's own scope to be prioritized over the through scope.
      But the sorting order will be prioritized that is evaluated first. It is
      unintentional effect, association scope's sorting order should be
      prioritized as well.
      
      Fixes #32008.
      5c6d6fd3
    • E
      Deprecate update_attributes and update_attributes! · 5645149d
      Eddie Lebow 提交于
      Closes #31998
      5645149d
  13. 17 2月, 2018 2 次提交
  14. 15 2月, 2018 1 次提交
  15. 13 2月, 2018 1 次提交
  16. 10 2月, 2018 1 次提交
  17. 08 2月, 2018 2 次提交
  18. 06 2月, 2018 1 次提交
    • R
      Invoke `load_schema` in `_default_attributes` · 06d04bc2
      Ryuta Kamizono 提交于
      Currently `_default_attributes` doesn't work unless `load_schema` is
      called before.
      
      The `MissingAttributeError` is caused by `reload_schema_from_cache` is
      invoked by `serialize`.
      
      I added `load_schema` in `_default_attributes` to `_default_attributes`
      works without any dependency like `attribute_types` etc.
      
      Closes #31905.
      06d04bc2
  19. 29 1月, 2018 4 次提交
  20. 26 1月, 2018 1 次提交