composite_primary_keys 10.0.3 → 10.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (69) hide show
  1. checksums.yaml +4 -4
  2. data/History.rdoc +6 -0
  3. data/lib/composite_primary_keys.rb +0 -2
  4. data/lib/composite_primary_keys/associations/preloader/association.rb +2 -0
  5. data/lib/composite_primary_keys/attribute_methods/primary_key.rb +1 -1
  6. data/lib/composite_primary_keys/connection_adapters/abstract_adapter.rb +10 -10
  7. data/lib/composite_primary_keys/locking/optimistic.rb +21 -31
  8. data/lib/composite_primary_keys/relation.rb +14 -3
  9. data/lib/composite_primary_keys/version.rb +1 -1
  10. data/scripts/console.rb +48 -48
  11. data/scripts/txt2html +76 -76
  12. data/scripts/txt2js +65 -65
  13. data/tasks/website.rake +18 -18
  14. data/test/README_tests.rdoc +56 -56
  15. data/test/connections/databases.yml +40 -30
  16. data/test/db_test.rb +52 -52
  17. data/test/fixtures/articles.yml +6 -6
  18. data/test/fixtures/capitol.rb +3 -3
  19. data/test/fixtures/capitols.yml +16 -16
  20. data/test/fixtures/comments.yml +15 -15
  21. data/test/fixtures/department.rb +5 -5
  22. data/test/fixtures/departments.yml +15 -15
  23. data/test/fixtures/dorms.yml +4 -4
  24. data/test/fixtures/group.rb +2 -2
  25. data/test/fixtures/groups.yml +6 -6
  26. data/test/fixtures/hack.rb +4 -4
  27. data/test/fixtures/hacks.yml +2 -2
  28. data/test/fixtures/membership_status.rb +2 -2
  29. data/test/fixtures/product.rb +9 -9
  30. data/test/fixtures/product_tariff.rb +5 -5
  31. data/test/fixtures/products.yml +11 -11
  32. data/test/fixtures/reading.rb +4 -4
  33. data/test/fixtures/readings.yml +10 -10
  34. data/test/fixtures/reference_code_using_composite_key_alias.rb +8 -8
  35. data/test/fixtures/reference_code_using_simple_key_alias.rb +8 -8
  36. data/test/fixtures/reference_codes.yml +28 -28
  37. data/test/fixtures/reference_types.yml +9 -9
  38. data/test/fixtures/restaurant.rb +9 -9
  39. data/test/fixtures/restaurants.yml +14 -14
  40. data/test/fixtures/restaurants_suburbs.yml +10 -10
  41. data/test/fixtures/room.rb +11 -11
  42. data/test/fixtures/room_assignment.rb +13 -13
  43. data/test/fixtures/room_assignments.yml +24 -24
  44. data/test/fixtures/room_attribute.rb +2 -2
  45. data/test/fixtures/room_attribute_assignment.rb +4 -4
  46. data/test/fixtures/room_attribute_assignments.yml +4 -4
  47. data/test/fixtures/room_attributes.yml +2 -2
  48. data/test/fixtures/rooms.yml +12 -12
  49. data/test/fixtures/seat.rb +5 -5
  50. data/test/fixtures/seats.yml +8 -8
  51. data/test/fixtures/street.rb +2 -2
  52. data/test/fixtures/streets.yml +16 -16
  53. data/test/fixtures/student.rb +3 -3
  54. data/test/fixtures/students.yml +15 -15
  55. data/test/fixtures/suburbs.yml +14 -14
  56. data/test/plugins/pagination.rb +405 -405
  57. data/test/plugins/pagination_helper.rb +135 -135
  58. data/test/setup.rb +50 -50
  59. data/test/test_aliases.rb +18 -18
  60. data/test/test_composite_arrays.rb +24 -24
  61. data/test/test_counter_cache.rb +30 -30
  62. data/test/test_dup.rb +37 -37
  63. data/test/test_exists.rb +39 -39
  64. data/test/test_miscellaneous.rb +32 -32
  65. data/test/test_pagination.rb +35 -35
  66. data/test/test_preload.rb +7 -0
  67. data/test/test_validations.rb +13 -13
  68. metadata +5 -6
  69. data/lib/composite_primary_keys/attribute_set/builder.rb +0 -22
@@ -1,22 +0,0 @@
1
- module ActiveRecord
2
- class AttributeSet # :nodoc:
3
- class Builder # :nodoc:
4
- silence_warnings do
5
- def build_from_database(values = {}, additional_types = {})
6
- # CPK
7
- # if always_initialized && !values.key?(always_initialized)
8
- # values[always_initialized] = nil
9
- # end
10
- Array(always_initialized).each do |always_initialized_attribute|
11
- if always_initialized_attribute && !values.key?(always_initialized_attribute)
12
- values[always_initialized_attribute] = nil
13
- end
14
- end
15
-
16
- attributes = LazyAttributeHash.new(types, values, additional_types)
17
- AttributeSet.new(attributes)
18
- end
19
- end
20
- end
21
- end
22
- end