Sha256: 1601aa373f3d9cffcd13441a2bc02a94f448c8138e1521b8760e6cb505718722

Contents?: true

Size: 292 Bytes

Versions: 2

Compression:

Stored size: 292 Bytes

Contents

module Ki
  module ViewHelper
    def view_exists? path
      path = path.path if path.class == BaseRequest
      File.file?(view_path(path))
    end

    def view_path path
      path = path.path if path.class == BaseRequest
      File.join(Ki::VIEWS_PATH, path + ".haml")
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ki-0.4.2 lib/ki/modules/view_helper.rb
ki-0.4.1 lib/ki/modules/view_helper.rb