From d88ac85cebf1a5f0271c490063eefd693e1aa7d1 Mon Sep 17 00:00:00 2001 From: Jérémy Zurcher Date: Mon, 16 Jan 2012 15:28:40 +0100 Subject: add Node.view_base_path! --- lib/zorglub/node.rb | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/zorglub/node.rb b/lib/zorglub/node.rb index 3f3b2c9..330a431 100644 --- a/lib/zorglub/node.rb +++ b/lib/zorglub/node.rb @@ -42,6 +42,14 @@ module Zorglub @layout = layout end # + def view_base_path! path + @view_base_path = path + end + # + def view_base_path + @view_base_path ||= Config.view_base_path + end + # def static! val @static = val if (val==true or val==false) @static ||= false @@ -231,7 +239,7 @@ module Zorglub # def view return '' if @options[:view].nil? - File.join(Config.view_base_path, @options[:view])+ext + File.join(self.class.view_base_path, @options[:view])+ext end # def ext! ext -- cgit v1.2.3