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.
- checksums.yaml +4 -4
- data/History.rdoc +6 -0
- data/lib/composite_primary_keys.rb +0 -2
- data/lib/composite_primary_keys/associations/preloader/association.rb +2 -0
- data/lib/composite_primary_keys/attribute_methods/primary_key.rb +1 -1
- data/lib/composite_primary_keys/connection_adapters/abstract_adapter.rb +10 -10
- data/lib/composite_primary_keys/locking/optimistic.rb +21 -31
- data/lib/composite_primary_keys/relation.rb +14 -3
- data/lib/composite_primary_keys/version.rb +1 -1
- data/scripts/console.rb +48 -48
- data/scripts/txt2html +76 -76
- data/scripts/txt2js +65 -65
- data/tasks/website.rake +18 -18
- data/test/README_tests.rdoc +56 -56
- data/test/connections/databases.yml +40 -30
- data/test/db_test.rb +52 -52
- data/test/fixtures/articles.yml +6 -6
- data/test/fixtures/capitol.rb +3 -3
- data/test/fixtures/capitols.yml +16 -16
- data/test/fixtures/comments.yml +15 -15
- data/test/fixtures/department.rb +5 -5
- data/test/fixtures/departments.yml +15 -15
- data/test/fixtures/dorms.yml +4 -4
- data/test/fixtures/group.rb +2 -2
- data/test/fixtures/groups.yml +6 -6
- data/test/fixtures/hack.rb +4 -4
- data/test/fixtures/hacks.yml +2 -2
- data/test/fixtures/membership_status.rb +2 -2
- data/test/fixtures/product.rb +9 -9
- data/test/fixtures/product_tariff.rb +5 -5
- data/test/fixtures/products.yml +11 -11
- data/test/fixtures/reading.rb +4 -4
- data/test/fixtures/readings.yml +10 -10
- data/test/fixtures/reference_code_using_composite_key_alias.rb +8 -8
- data/test/fixtures/reference_code_using_simple_key_alias.rb +8 -8
- data/test/fixtures/reference_codes.yml +28 -28
- data/test/fixtures/reference_types.yml +9 -9
- data/test/fixtures/restaurant.rb +9 -9
- data/test/fixtures/restaurants.yml +14 -14
- data/test/fixtures/restaurants_suburbs.yml +10 -10
- data/test/fixtures/room.rb +11 -11
- data/test/fixtures/room_assignment.rb +13 -13
- data/test/fixtures/room_assignments.yml +24 -24
- data/test/fixtures/room_attribute.rb +2 -2
- data/test/fixtures/room_attribute_assignment.rb +4 -4
- data/test/fixtures/room_attribute_assignments.yml +4 -4
- data/test/fixtures/room_attributes.yml +2 -2
- data/test/fixtures/rooms.yml +12 -12
- data/test/fixtures/seat.rb +5 -5
- data/test/fixtures/seats.yml +8 -8
- data/test/fixtures/street.rb +2 -2
- data/test/fixtures/streets.yml +16 -16
- data/test/fixtures/student.rb +3 -3
- data/test/fixtures/students.yml +15 -15
- data/test/fixtures/suburbs.yml +14 -14
- data/test/plugins/pagination.rb +405 -405
- data/test/plugins/pagination_helper.rb +135 -135
- data/test/setup.rb +50 -50
- data/test/test_aliases.rb +18 -18
- data/test/test_composite_arrays.rb +24 -24
- data/test/test_counter_cache.rb +30 -30
- data/test/test_dup.rb +37 -37
- data/test/test_exists.rb +39 -39
- data/test/test_miscellaneous.rb +32 -32
- data/test/test_pagination.rb +35 -35
- data/test/test_preload.rb +7 -0
- data/test/test_validations.rb +13 -13
- metadata +5 -6
- 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
|