lib/stasis.rb in stasis-0.1.6 vs lib/stasis.rb in stasis-0.1.7
- old
+ new
@@ -173,9 +173,12 @@
trigger(:before_render)
# Skip if `@path` set to `nil`.
next unless @path
+ # Change current working directory.
+ Dir.chdir(File.dirname(@path))
+
# Render the view.
view =
# If the path has an extension supported by [Tilt][ti]...
if ext
# If the controller calls `render` within the `before` block for this
\ No newline at end of file