1. 30 5月, 2011 1 次提交
  2. 21 5月, 2011 1 次提交
  3. 18 5月, 2011 2 次提交
  4. 02 5月, 2011 1 次提交
    • C
      Optimize ActiveResource::Base.new(attributes) · a962bfe4
      Chris Griego 提交于
      * Add performance benchmark similar to ActiveRecord
      * Lazily find_or_create_resource_for_collection to not incur the overhead for empty arrays and arrays of primatives
      * #duplicable? is faster than inline rescues when the object is not duplicable
      * Don't constantly raise and handle NameError, raising is expensive
      * Even when a resource is nested inside a module, always look inside the class first for the resource definition so we don't overwrite classes all the time
      
      Before:                                     user     system      total        real
      Model.new (instantiation)               0.120000   0.000000   0.120000 (  0.119961)
      Nested::Model.new (instantiation)       0.150000   0.010000   0.160000 (  0.151183)
      Model.new (setting attributes)         28.540000   0.680000  29.220000 ( 29.271775)
      Nested::Model.new (setting attributes) 29.740000   0.580000  30.320000 ( 30.486210)
      
      After:                                        user     system      total        real
      Model.new (instantiation)                 0.120000   0.000000   0.120000 (  0.121249)
      Nested::Model.new (instantiation)         0.150000   0.010000   0.160000 (  0.152429)
      Model.new (setting attributes)           11.480000   0.170000  11.650000 ( 11.656163)
      Nested::Model.new (setting attributes)   11.510000   0.210000  11.720000 ( 11.724249)
      a962bfe4
  5. 05 3月, 2011 1 次提交
  6. 04 3月, 2011 1 次提交
  7. 29 1月, 2011 2 次提交
  8. 21 11月, 2010 1 次提交
  9. 28 9月, 2010 7 次提交
  10. 25 9月, 2010 2 次提交
    • J
      Allow per Resource format settings · 51f1f550
      Jacques Crocker 提交于
      Previously, ActiveResource was using the connection level formatter for get requests. This made it impossible to use custom formatters per resource.
      
      Additionally this commit makes the Connection request methods more consistent. It always returns a Response. The base will then decode it each the response using its format setting.
      
      Merging this commit will allow users to add custom formatters on a per Resource basis. This enables handling pagination responses from the server side, a very common use case that was previously impossible without monkeypatching XmlFormat.
      Signed-off-by: NJosé Valim <jose.valim@gmail.com>
      51f1f550
    • J
      Allow ActiveResource to work with non-generated ids [#5660 state:resolved] · ee5ef67c
      Jacques Crocker 提交于
      This commit updates new? so that it knows whether or not the record was actually new or not, and doesn't rely solely on the presence of id. This enables the ability to set a custom primary_key that is not autogenerated by the server.
      Signed-off-by: NJosé Valim <jose.valim@gmail.com>
      ee5ef67c
  11. 23 9月, 2010 1 次提交
  12. 20 9月, 2010 1 次提交
  13. 19 9月, 2010 1 次提交
  14. 26 8月, 2010 2 次提交
  15. 24 8月, 2010 1 次提交
  16. 02 8月, 2010 1 次提交
  17. 26 7月, 2010 2 次提交
  18. 24 6月, 2010 1 次提交
  19. 12 6月, 2010 1 次提交
  20. 11 6月, 2010 1 次提交
  21. 03 6月, 2010 1 次提交
  22. 26 5月, 2010 1 次提交
  23. 20 5月, 2010 1 次提交
  24. 15 5月, 2010 1 次提交
  25. 13 5月, 2010 2 次提交
  26. 27 4月, 2010 1 次提交
  27. 26 4月, 2010 1 次提交
  28. 10 4月, 2010 1 次提交