summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2024-09-04 10:57:12 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2024-09-04 10:57:12 +0200
commit4b65c9f02e6bc6e289ac7c660c20232bbb3fff00 (patch)
tree6dea6ce8208a306a81fcf322787ee33b8e3d8baf /lib
parent7bdcb395d1cc7d4f279c0ad8264575d35c0014a2 (diff)
downloadzorglub-4b65c9f02e6bc6e289ac7c660c20232bbb3fff00.zip
zorglub-4b65c9f02e6bc6e289ac7c660c20232bbb3fff00.tar.gz
Node : rewrite static_path logic
Diffstat (limited to 'lib')
-rw-r--r--lib/zorglub/node.rb7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/zorglub/node.rb b/lib/zorglub/node.rb
index 335aa68..a6159c3 100644
--- a/lib/zorglub/node.rb
+++ b/lib/zorglub/node.rb
@@ -286,11 +286,10 @@ module Zorglub
self.class.call_before_hooks self unless no_hooks
@state = :meth
@content = send @meth, *@args
- static_path = static
- if static_path.nil?
- compile_page!
- else
+ if (static_path = static)
static_page! static_path
+ else
+ compile_page!
end
@state = :post_cb
self.class.call_after_hooks self unless no_hooks