1. 22 7月, 2012 2 次提交
  2. 17 7月, 2012 5 次提交
  3. 14 7月, 2012 1 次提交
  4. 13 7月, 2012 1 次提交
  5. 08 7月, 2012 3 次提交
  6. 07 7月, 2012 3 次提交
  7. 06 7月, 2012 3 次提交
  8. 28 6月, 2012 1 次提交
  9. 26 6月, 2012 1 次提交
  10. 23 6月, 2012 1 次提交
  11. 22 6月, 2012 1 次提交
  12. 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
  13. 18 6月, 2012 1 次提交
  14. 17 6月, 2012 3 次提交
  15. 01 6月, 2012 1 次提交
  16. 24 5月, 2012 1 次提交
    • V
      Revert "Remove blank trailing comments" · 1ad0b378
      Vijay Dev 提交于
      This reverts commit fa6d921e.
      
      Reason: Not a fan of such massive changes. We usually close such changes
      if made to Rails master as a pull request. Following the same principle
      here and reverting.
      
      [ci skip]
      1ad0b378
  17. 20 5月, 2012 1 次提交
    • H
      Remove blank trailing comments · fa6d921e
      Henrik Hodne 提交于
      For future reference, this is the regex I used: ^\s*#\s*\n(?!\s*#). Replace
      with the first match, and voilà! Note that the regex matches a little bit too
      much, so you probably want to `git add -i .` and go through every single diff
      to check if it actually should be changed.
      fa6d921e
  18. 17 5月, 2012 1 次提交
  19. 12 5月, 2012 1 次提交
    • J
      CollectionProxy < Relation · c86a32d7
      Jon Leighton 提交于
      This helps bring the interfaces of CollectionProxy and Relation closer
      together, and reduces the delegation backflips we need to perform.
      
      For example, first_or_create is defined thus:
      
      class ActiveRecord::Relation
        def first_or_create(...)
          first || create(...)
        end
      end
      
      If CollectionProxy < Relation, then post.comments.first_or_create will
      hit the association's #create method which will actually add the new record
      to the association, just as post.comments.create would.
      
      With the previous delegation, post.comments.first_or_create expands to
      post.comments.scoped.first_or_create, where post.comments.scoped has no
      knowledge of the association.
      c86a32d7
  20. 13 4月, 2012 5 次提交
  21. 12 3月, 2012 1 次提交
  22. 07 2月, 2012 1 次提交
  23. 06 2月, 2012 1 次提交