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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f6d5f56909cea81da55f6fa06647c5c592e89a0d
4
- data.tar.gz: 155ec5e26df26859ca1100f9e5236e6a4d3f6d10
3
+ metadata.gz: 51bfc4fc41221cc634ee2831ee09c9311398e4a7
4
+ data.tar.gz: 217ff7d00e3d7127e6d359b1592c4736254457e8
5
5
  SHA512:
6
- metadata.gz: 10ed5068e655a2f55f462be13ce75ab18c894cbb82a0644cd2bad525efc6e0a162e087dc7027485b6671b7a9ebd1a50f3cd4b720797e350695593ebaefcaee5e
7
- data.tar.gz: 07dea83e669fdd515d89751270ccf46028454c2f5caabee4c9e5968fe0d01e9534dbc130424605f03cbfef0d6bcc52fb353778b3f19048a806f0dbc529ff8aa0
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?(:to_param) ? obj.to_param : obj.id.to_s
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
@@ -1,3 +1,3 @@
1
1
  module PresenterObject
2
- VERSION = "0.3.0"
2
+ VERSION = "0.3.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: presenter_object
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Diego Salazar