module ActivesupportOverride

Public Instance Methods

external_path?(path) click to toggle source
# File lib/generator/helper/activesupport_override.rb, line 41
def external_path? path
  path.start_with?('//') || path.start_with?('http')
end
javascript_include_tag(path) click to toggle source
# File lib/generator/helper/activesupport_override.rb, line 6
def javascript_include_tag(path)
  '<script src="'+path_to_js(path)+'"></script>'
end
meta_tag(type, content) click to toggle source
# File lib/generator/helper/activesupport_override.rb, line 10
def meta_tag(type, content)
  '<meta name="'+type+'" content="'+content+'" />'
end
meta_tag_http(type, content) click to toggle source
# File lib/generator/helper/activesupport_override.rb, line 14
def meta_tag_http(type, content)
  '<meta http-equiv="'+type+'" content="'+content+'" />'
end
path_to_css(path) click to toggle source
# File lib/generator/helper/activesupport_override.rb, line 23
def path_to_css(path)
  return path if external_path?(path)
  return "css/#{path}" if file_exists? "css/#{path}"
  path
end
path_to_image(path) click to toggle source
# File lib/generator/helper/activesupport_override.rb, line 35
def path_to_image(path)
  return path if external_path? path
  return "images/#{path}" if file_exists? "images/#{path}"
  path
end
path_to_js(path) click to toggle source
# File lib/generator/helper/activesupport_override.rb, line 29
def path_to_js(path)
  return path if external_path? path
  return "js/#{path}" if file_exists? "js/#{path}"
  path
end
url_for(options = '') click to toggle source
# File lib/generator/helper/activesupport_override.rb, line 45
def url_for(options = '')
 return options
end