bourgeois 1.0.3 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/bourgeois/presenter.rb +2 -2
- data/lib/bourgeois/version.rb +1 -1
- data/lib/bourgeois/view_helper.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: 21f5d2e5370c18e3a9483713304492e75584dea1
|
4
|
+
data.tar.gz: 092d1dc63148b27d14c1976b50042e3ff1d1a27c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ab8ce7c816a126193dce558fe8a2cea7dd12d6cc669e41e817cc150a7168a6548a10d892960530bd7cb1bfb827892606303ca01208854af2d2f273988422d1a1
|
7
|
+
data.tar.gz: d6bf0949d6bc7ff412e71d7ed336f2d8584336456b1bb7a5cfe46f1b1004f9ffe1d09f24c1637577739fca471f9d043d179d0e451d99697edcf2f04d749b7b52
|
data/lib/bourgeois/presenter.rb
CHANGED
@@ -54,7 +54,7 @@ module Bourgeois
|
|
54
54
|
# puts user.inspect # => #<UserPresenter object=#<User name="Remi>>
|
55
55
|
# puts user.name # => Remi
|
56
56
|
# end
|
57
|
-
def self.present(object, klass = nil, &blk)
|
57
|
+
def self.present(object, klass = nil, view = nil, &blk)
|
58
58
|
return if object.nil?
|
59
59
|
return object.map { |o| present(o, klass, &blk) } if object.respond_to?(:to_a) && !object.is_a?(Struct)
|
60
60
|
|
@@ -64,7 +64,7 @@ module Bourgeois
|
|
64
64
|
klass ||= presenter_class(object)
|
65
65
|
end
|
66
66
|
|
67
|
-
presenter ||= klass.new(object,
|
67
|
+
presenter ||= klass.new(object, view)
|
68
68
|
yield presenter if block_given?
|
69
69
|
|
70
70
|
presenter
|
data/lib/bourgeois/version.rb
CHANGED