1. 25 9月, 2013 1 次提交
  2. 28 6月, 2013 1 次提交
  3. 26 6月, 2013 1 次提交
  4. 17 5月, 2013 1 次提交
  5. 16 5月, 2013 1 次提交
  6. 23 3月, 2013 1 次提交
  7. 11 12月, 2012 1 次提交
    • A
      Deprecate obsolete Time to DateTime fallback methods · 48583f8b
      Andrew White 提交于
      The Time.time_with_datetime_fallback, Time.utc_time and Time.local_time
      methods were added to handle the limitations of Ruby's native Time
      implementation. Those limitations no longer apply so we are deprecating
      them in 4.0 and they will be removed in 4.1.
      48583f8b
  8. 18 10月, 2012 1 次提交
  9. 20 9月, 2012 2 次提交
  10. 17 9月, 2012 4 次提交
  11. 18 8月, 2012 12 次提交
  12. 03 8月, 2012 1 次提交
  13. 28 7月, 2012 1 次提交
  14. 28 6月, 2012 1 次提交
  15. 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
  16. 16 6月, 2012 3 次提交
  17. 10 6月, 2012 1 次提交
    • A
      Ensure that mass assignment options are preserved · c2e61aa6
      Andrew White 提交于
      There are two possible scenarios where the @mass_assignment_options
      instance variable can become corrupted:
      
      1. If the assign_attributes doesn't complete correctly, then
         subsequent calls to a nested attribute assignment method will use
         whatever options were passed to the previous assign_attributes call.
      
      2. With nested assign_attributes calls, the inner call will overwrite
         the current options. This will only affect nested attributes as the
         attribute hash is sanitized before any methods are called.
      
      To fix this we save the current options in a local variable and then
      restore these options in an ensure block.
      c2e61aa6
  18. 08 6月, 2012 1 次提交
  19. 16 12月, 2011 1 次提交