lib/bolt/page.rb in benofsky-bolt-0.3.1 vs lib/bolt/page.rb in benofsky-bolt-0.3.2
- old
+ new
@@ -16,10 +16,15 @@
raise ArgumentError, ":engine cannot be view" if options[:engine] == "view"
require options[:engine_require] || options[:engine]
@content = render_view(view_as_string(view, options[:engine]), options[:engine])
- render_view(view_as_string(options[:template]), options[:engine]) unless options[:template].empty?
+
+ if options[:template]
+ return render_view(view_as_string(options[:template]), options[:engine])
+ else
+ return @content
+ end
end
# Writes a file containing whatever is returned from a supplied block
# Will create directories as required by <tt>path</tt>
def page(path)
\ No newline at end of file