presenter_object 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/presenter_object/base.rb +7 -1
- data/lib/presenter_object/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 51bfc4fc41221cc634ee2831ee09c9311398e4a7
|
4
|
+
data.tar.gz: 217ff7d00e3d7127e6d359b1592c4736254457e8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4f9092d1ddaff4b2dde63ac5467774f799343e3a820873f755cb571942ebf42600491712e2f37caa3952e56ca257d5f405459b762ea0434059513ffb2dc418e0
|
7
|
+
data.tar.gz: 785141dfce3cea8e20e76e13b85afd2441b89c10ced3d6d1f0cb2a9012296e61bb2a18e0618e4ffc5e8374f3b28275a08a0d8a2c8eca92d14a85e228ce639683
|
@@ -46,6 +46,12 @@ class PresenterObject::Base
|
|
46
46
|
|
47
47
|
# let link helpers know the object's id
|
48
48
|
def parameterize(obj)
|
49
|
-
obj.respond_to?
|
49
|
+
if obj.respond_to? :to_param
|
50
|
+
obj.to_param
|
51
|
+
elsif obj.respond_to? :id
|
52
|
+
obj.id.to_s
|
53
|
+
else
|
54
|
+
''
|
55
|
+
end
|
50
56
|
end
|
51
57
|
end
|