lib/capcode/render/haml.rb in Capcode-0.8.2 vs lib/capcode/render/haml.rb in Capcode-0.8.4
- old
+ new
@@ -1,16 +1,17 @@
require "haml"
module Capcode
module Helpers
@@__HAML_PATH__ = nil
- def self.haml_path=( p )
+ # Set the path to Haml files. If this path is not set, Capcode will search in the static path.
+ def self.haml_path=( p ) #:nodoc:
@@__HAML_PATH__ = p
end
def render_haml( f, opts ) #:nodoc:
if @@__HAML_PATH__.nil?
- @@__HAML_PATH__ = "." + (Capcode.static.nil? == false)?Capcode.static:''
+ @@__HAML_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