8
9
10
11
12
13
14
15
16
17
18
19
20
|
# File 'lib/wdk-view-toolkit/js_partial/js.rb', line 8
def include_js
template_path = File.expand_path('../', __FILE__)
template = ""
js_files = File.join("js","**", "*.js")
Dir.glob js_files do |file|
if ! base_js file
template += Tilt.new("#{template_path}/_js_script_tag.haml").render self, {:js_file_path => file}
end
end
template += Tilt.new("#{template_path}/_js_script_tag.haml").render self, {:js_file_path => "js/application.js"}
template += Tilt.new("#{template_path}/_js_script_tag.haml").render self, {:js_file_path => "js/routes.js"}
template
end
|