1. 08 2月, 2013 1 次提交
  2. 03 1月, 2013 1 次提交
  3. 14 11月, 2012 1 次提交
  4. 13 11月, 2012 1 次提交
  5. 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
  6. 03 8月, 2012 1 次提交
    • J
      Remove ActiveRecord::Base.to_a · 55b24888
      Jon Leighton 提交于
      On reflection, it seems like a bit of a weird method to have on
      ActiveRecord::Base, and it shouldn't be needed most of the time anyway.
      55b24888
  7. 28 7月, 2012 2 次提交
  8. 27 7月, 2012 1 次提交
    • J
      ActiveRecord::Base.all returns a Relation. · 6a81ccd6
      Jon Leighton 提交于
      Previously it returned an Array.
      
      If you want an array, call e.g. `Post.to_a` rather than `Post.all`. This
      is more explicit.
      
      In most cases this should not break existing code, since
      Relations use method_missing to delegate unknown methods to #to_a
      anyway.
      6a81ccd6
  9. 25 6月, 2012 1 次提交
  10. 22 6月, 2012 1 次提交
  11. 19 6月, 2012 1 次提交
    • S
      Removing composed_of from ActiveRecord. · 14fc8b34
      Steve Klabnik 提交于
      This feature adds a lot of complication to ActiveRecord for dubious
      value. Let's talk about what it does currently:
      
      class Customer < ActiveRecord::Base
        composed_of :balance, :class_name => "Money", :mapping => %w(balance amount)
      end
      
      Instead, you can do something like this:
      
          def balance
            @balance ||= Money.new(value, currency)
          end
      
          def balance=(balance)
            self[:value] = balance.value
            self[:currency] = balance.currency
            @balance = balance
          end
      
      Since that's fairly easy code to write, and doesn't need anything
      extra from the framework, if you use composed_of today, you'll
      have to add accessors/mutators like that.
      
      Closes #1436
      Closes #2084
      Closes #3807
      14fc8b34
  12. 11 6月, 2012 3 次提交
  13. 06 6月, 2012 1 次提交
  14. 18 5月, 2012 2 次提交
  15. 11 5月, 2012 1 次提交
  16. 05 5月, 2012 1 次提交
  17. 03 5月, 2012 2 次提交
  18. 27 4月, 2012 7 次提交
  19. 26 4月, 2012 2 次提交
  20. 14 4月, 2012 1 次提交
  21. 12 3月, 2012 2 次提交
  22. 27 1月, 2012 1 次提交
    • P
      Fix regression from Rails 3.1 · 7b9baeed
      Paul McMahon 提交于
      Under Rails 3.1, you were allowed to pass a hash to a find_or_create
      method with multiple attribute names, but this was broken as the
      arguments were being improperly validated.
      7b9baeed
  23. 17 1月, 2012 2 次提交
  24. 29 12月, 2011 1 次提交
  25. 30 11月, 2011 1 次提交
  26. 15 11月, 2011 1 次提交