1. 09 9月, 2012 1 次提交
    • E
      Raise MissingAttributeError on query methods · 4f107da4
      Ernie Miller 提交于
      When calling a query method on an attribute that was not selected by
      an ActiveRecord query, an ActiveModel::MissingAttributeError is not
      raised. Instead, a nil value is returned, which will return false once
      cast to boolean.
      
      This is undesirable, as we should not give the impression that we know
      the attribute's boolean value when we haven't loaded the attribute's
      (possibly) non-boolean value from the database.
      
      This issue is present on versions going back as far as 2.3, at least.
      4f107da4
  2. 08 9月, 2012 2 次提交
  3. 07 9月, 2012 1 次提交
  4. 06 9月, 2012 4 次提交
  5. 05 9月, 2012 3 次提交
  6. 04 9月, 2012 2 次提交
  7. 03 9月, 2012 1 次提交
    • Y
      set the configured #inheritance_column on #become (#7503) · 20574956
      Yves Senn 提交于
      I had to create a new table because I needed an STI table,
      which does not have both a "type" and a "custom_type"
      
      the test fails with:
        1) Error:
      test_alt_becomes_works_with_sti(InheritanceTest):
      NoMethodError: undefined method `type=' for #<Cabbage id: 1, name: "my cucumber", custom_type: "Cucumber">
          /Users/username/Projects/rails/activemodel/lib/active_model/attribute_methods.rb:432:in `method_missing'
          /Users/username/Projects/rails/activerecord/lib/active_record/attribute_methods.rb:100:in `method_missing'
          /Users/username/Projects/rails/activerecord/lib/active_record/persistence.rb:165:in `becomes'
          test/cases/inheritance_test.rb:134:in `test_becomes_works_with_sti'
          test/cases/inheritance_test.rb:140:in `test_alt_becomes_works_with_sti'
      20574956
  8. 31 8月, 2012 3 次提交
  9. 29 8月, 2012 1 次提交
  10. 28 8月, 2012 2 次提交
  11. 27 8月, 2012 1 次提交
  12. 26 8月, 2012 8 次提交
  13. 25 8月, 2012 1 次提交
  14. 24 8月, 2012 1 次提交
  15. 22 8月, 2012 2 次提交
  16. 21 8月, 2012 6 次提交
  17. 19 8月, 2012 1 次提交