lib/stasis.rb in stasis-0.1.8 vs lib/stasis.rb in stasis-0.1.9
- old
+ new
@@ -30,10 +30,11 @@
$:.unshift File.dirname(__FILE__)
# Require all Stasis library files.
require 'stasis/dev_mode'
+require 'stasis/options'
require 'stasis/plugin'
require 'stasis/server'
require 'stasis/scope'
require 'stasis/scope/action'
@@ -184,11 +185,12 @@
if ext
# If the controller calls `render` within the `before` block for this
# path, receive output from `@action._render`.
#
# Otherwise, render the file located at `@path`.
- output = @action._render || @action.render(@path, :callback => false)
+ render_opts = {:callback => false}.merge(:template => Options.get_template_option(ext))
+ output = @action._render || @action.render(@path, render_opts)
# If a layout was specified via the `layout` method...
if @action._layout
# Render the layout with a block for the layout to `yield` to.
@action.render(@action._layout) { output }
@@ -289,6 +291,6 @@
plugins << klass
end
end
plugins
end
-end
\ No newline at end of file
+end