lib/capcode/render/erb.rb in Capcode-0.8.2 vs lib/capcode/render/erb.rb in Capcode-0.8.4

- old
+ new

@@ -1,20 +1,22 @@ require 'erb' module Capcode module Helpers @@__ERB_PATH__ = "." - def self.erb_path=( p ) + + # Set the path to ERB files. If this path is not set, Capcode will search in the static path. + def self.erb_path=( p ) #:nodoc: @@__ERB_PATH__ = p end - def get_binding + def get_binding #:nodoc: binding end def render_erb( f, opts ) #:nodoc: if @@__ERB_PATH__.nil? - @@__ERB_PATH__ = "." + (Capcode.static.nil? == false)?Capcode.static:'' + @@__ERB_PATH__ = "." + (Capcode.static.nil? == false)?Capcode.static():'' end f = f.to_s if f.include? '..' return [403, {}, '403 - Invalid path'] \ No newline at end of file