1. 01 7月, 2017 1 次提交
  2. 28 6月, 2017 2 次提交
  3. 21 6月, 2017 1 次提交
  4. 15 6月, 2017 1 次提交
  5. 14 6月, 2017 3 次提交
  6. 31 5月, 2017 1 次提交
  7. 30 5月, 2017 1 次提交
  8. 27 5月, 2017 2 次提交
  9. 23 5月, 2017 1 次提交
  10. 22 5月, 2017 1 次提交
  11. 03 5月, 2017 2 次提交
  12. 30 4月, 2017 1 次提交
  13. 24 4月, 2017 2 次提交
  14. 15 4月, 2017 1 次提交
    • A
      Move around AR::Dirty and fix _attribute method · 83d6cc48
      Aaron Patterson 提交于
      We already have a _read_attribute method that can get the value we need
      from the model.  Lets define that method in AM::Dirty and use the
      existing one from AR::Dirty rather than introducing a new method.
      83d6cc48
  15. 13 4月, 2017 1 次提交
  16. 12 4月, 2017 2 次提交
  17. 02 4月, 2017 1 次提交
    • T
      No need to check nil · d1ca18d2
      Tsukuru Tanimichi 提交于
      ```ruby
      nil.respond_to?(:stringify_keys) # => false
      ```
      
      ```ruby
      include ActiveModel::AttributeAssignment
      Object.new.assign_attributes(nil) #  => ArgumentError: When assigning attributes, you must pass a hash as an argument.
      ```
      d1ca18d2
  18. 01 4月, 2017 1 次提交
  19. 29 3月, 2017 1 次提交
  20. 28 3月, 2017 1 次提交
    • B
      Fix ActiveModel::Errors #keys, #values · 01269aed
      bogdanvlviv 提交于
      Before:
        person.errors.keys    # => []
        person.errors.values  # => []
        person.errors[:name]  # => []
        person.errors.keys    # => [:name]
        person.errors.values  # => [[]]
      
      After:
        person.errors.keys   # => []
        person.errors.values # => []
        person.errors[:name] # => []
        person.errors.keys   # => []
        person.errors.values # => []
      
      Related to #23468
      01269aed
  21. 22 3月, 2017 1 次提交
  22. 11 3月, 2017 1 次提交
  23. 25 2月, 2017 2 次提交
  24. 24 2月, 2017 1 次提交
  25. 21 2月, 2017 1 次提交
    • P
      Fix `define_attribute_method` with Symbol in AR · 0b157f8d
      Prem Sichanugrist 提交于
      This issue is only appear when you try to call `define_attribute_method`
      and passing a symbol in Active Record. It does not appear in isolation
      in Active Model itself.
      
      Before this patch, when you run `User.define_attribute_method :foo`, you
      will get:
      
          NoMethodError: undefined method `unpack' for :foo:Symbol
              from activerecord/lib/active_record/attribute_methods/read.rb:28:in `define_method_attribute'
              from activerecord/lib/active_record/attribute_methods/primary_key.rb:61:in `define_method_attribute'
              from activemodel/lib/active_model/attribute_methods.rb:292:in `block in define_attribute_method'
              from activemodel/lib/active_model/attribute_methods.rb:285:in `each'
              from activemodel/lib/active_model/attribute_methods.rb:285:in `define_attribute_method'
      
      This patch contains both a fix in Active Model and a test in Active
      Record for this error.
      0b157f8d
  26. 18 2月, 2017 1 次提交
  27. 17 2月, 2017 1 次提交
  28. 16 2月, 2017 1 次提交
  29. 15 2月, 2017 1 次提交
  30. 13 2月, 2017 1 次提交
  31. 07 2月, 2017 2 次提交