redis_object 1.3.1 → 1.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/redis_object/base.rb +8 -4
- data/lib/redis_object/version.rb +1 -1
- data/spec/rename_class_spec.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NzZmMGZlNjJjNDM2NDUzZDc1NWY1YjdjMzNlMDRlZmI2OTljMmMwMg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NWM0MDhkYzAzODdiZDI3NDliMjViOGQ1Njg0ZDNmZmQ2YmFlODI2OQ==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
OTlkMTQ2ZmZkY2ZlZmRkNjgyNTA1NDJiZjI5ZDk4Yjc5MTc2YTEzNjdlZThh
|
10
|
+
ODM0YWIzMTdkNGE0NzgzNDM0OGViMzAwYTljYTg5YmY0NzkzMWQ0ZDQwNGIz
|
11
|
+
NWE3YmRjYzJkZjcxMTFhOGNmOTJkM2RmNjg3NGMzZjA0NjdkZWU=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YjBjM2IxNDkwNTRjYTVlYjU5ZGM0NzM1MTJlZjk4MGQ0YmQ2YjZlNzJjMDZh
|
14
|
+
ZjY3MDk3YTVkMDM5NmM5YzFmZmViNGQ4Mjc2ODQ3ZTUyNDBkOTI2OTc0ZmM2
|
15
|
+
M2FhY2I1ZmQzMjI3YTdkYzFiZjc5YjY5MWRmOTU2OWNmMDM2NWU=
|
data/lib/redis_object/base.rb
CHANGED
@@ -236,7 +236,7 @@ module Seabright
|
|
236
236
|
end
|
237
237
|
|
238
238
|
def cname
|
239
|
-
|
239
|
+
name
|
240
240
|
end
|
241
241
|
|
242
242
|
def plname
|
@@ -418,7 +418,11 @@ module Seabright
|
|
418
418
|
true
|
419
419
|
end
|
420
420
|
|
421
|
-
def id_sym(cls=
|
421
|
+
def id_sym(cls=nil)
|
422
|
+
_old_id_sym(cls)
|
423
|
+
end
|
424
|
+
|
425
|
+
def _new_id_sym(cls=self.name)
|
422
426
|
(cls || self.name).foreign_key.to_sym
|
423
427
|
end
|
424
428
|
|
@@ -433,8 +437,8 @@ module Seabright
|
|
433
437
|
end
|
434
438
|
end
|
435
439
|
|
436
|
-
def _old_id_sym(cls=self.
|
437
|
-
"#{cls.split('::').last.downcase}_id".to_sym
|
440
|
+
def _old_id_sym(cls=self.name)
|
441
|
+
"#{(cls || self.name).split('::').last.downcase}_id".to_sym
|
438
442
|
end
|
439
443
|
|
440
444
|
def describe
|
data/lib/redis_object/version.rb
CHANGED
data/spec/rename_class_spec.rb
CHANGED
@@ -73,7 +73,7 @@ module RenameClassSpec
|
|
73
73
|
[ mozzarella, basil, tomato, garlic, oregano, olive_oil ].each do |topping|
|
74
74
|
topping.get(:class).should == PizzaTopping.name
|
75
75
|
topping.get(:key).should == "RenameClassSpec::PizzaTopping:#{topping.id}"
|
76
|
-
topping.get(:
|
76
|
+
topping.get(:pizzatopping_id).should == topping.id
|
77
77
|
# topping.get(:topping_id).should == nil
|
78
78
|
end
|
79
79
|
|