ruhl 0.9.4 → 0.9.5
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -0
- data/VERSION +1 -1
- data/lib/ruhl/rails.rb +17 -1
- data/ruhl.gemspec +1 -1
- metadata +1 -1
data/Rakefile
CHANGED
@@ -26,6 +26,7 @@ begin
|
|
26
26
|
gemspec.add_dependency('nokogiri','>=1.3.3')
|
27
27
|
gemspec.add_development_dependency('rspec')
|
28
28
|
end
|
29
|
+
Jeweler::GemcutterTasks.new
|
29
30
|
rescue LoadError
|
30
31
|
puts "Jeweler not available. Install it with: sudo gem install technicalpickles-jeweler -s http://gems.github.com"
|
31
32
|
end
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.9.
|
1
|
+
0.9.5
|
data/lib/ruhl/rails.rb
CHANGED
@@ -13,7 +13,6 @@ module Ruhl
|
|
13
13
|
options[:layout] = layout.filename
|
14
14
|
options[:layout_source] = layout.source
|
15
15
|
|
16
|
-
Rails.logger.info("calling ruhl. template: #{template.inspect}\n options: #{options.inspect}")
|
17
16
|
Ruhl::Engine.new(template.source, options).render(@action_view)
|
18
17
|
end
|
19
18
|
end
|
@@ -23,3 +22,20 @@ ActionView::Template.register_template_handler(:ruhl, Ruhl::Plugin)
|
|
23
22
|
|
24
23
|
ActionView::Template.exempt_from_layout(:ruhl)
|
25
24
|
|
25
|
+
|
26
|
+
module Ruhl
|
27
|
+
class Engine
|
28
|
+
private
|
29
|
+
|
30
|
+
def render_partial(tag, code)
|
31
|
+
file = execute_ruby(tag, code)
|
32
|
+
|
33
|
+
template = scope.view_paths.find_template(file)
|
34
|
+
|
35
|
+
raise PartialNotFoundError.new(file) unless template
|
36
|
+
|
37
|
+
render_file( template.source )
|
38
|
+
end
|
39
|
+
|
40
|
+
end
|
41
|
+
end
|
data/ruhl.gemspec
CHANGED