darkhelmet-darkext 0.8.5 → 0.8.6
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +4 -0
- data/VERSION.yml +1 -1
- data/lib/darkext/sinatra.rb +13 -3
- metadata +1 -1
data/History.txt
CHANGED
data/VERSION.yml
CHANGED
data/lib/darkext/sinatra.rb
CHANGED
@@ -9,9 +9,19 @@ module Sinatra
|
|
9
9
|
html
|
10
10
|
end
|
11
11
|
|
12
|
-
def partial(
|
13
|
-
|
14
|
-
|
12
|
+
def partial(template, options = {})
|
13
|
+
options = args.extract_options!
|
14
|
+
options.merge!(:layout => false)
|
15
|
+
if collection = options.delete(:collection) then
|
16
|
+
collection.inject([]) do |buffer, member|
|
17
|
+
buffer << haml(template, options.merge(:layout => false,
|
18
|
+
:locals => {template.to_sym => member}))
|
19
|
+
end.join("\n")
|
20
|
+
else
|
21
|
+
haml(template, options)
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
15
25
|
end
|
16
26
|
|
17
27
|
def css_link_tag(sheet, media = 'screen,projection')
|