Module: ViewAssets
- Defined in:
- lib/view_assets.rb,
lib/view_assets/error.rb,
lib/view_assets/railtie.rb,
lib/view_assets/version.rb,
lib/view_assets/path_info.rb,
lib/view_assets/action_view.rb,
lib/view_assets/finder/core.rb,
lib/view_assets/manager/map.rb,
lib/view_assets/finder/finder.rb,
lib/view_assets/packager/core.rb,
lib/view_assets/manager/manager.rb,
lib/view_assets/finder/directive.rb,
lib/view_assets/finder/js_finder.rb,
lib/view_assets/manager/modifier.rb,
lib/view_assets/finder/css_finder.rb,
lib/view_assets/packager/packager.rb,
lib/view_assets/packager/actions_map.rb
Overview
Manifest file is a file that contains some dependency directives on top of it. Finder will parse these directives if existed and include them in the html. Usually, the first manifest file will be application. in /app/assets/ folder. However, if there is a :controller. file existed in /app/assets/:controller folder, then it will replace application as the first manifest file. It will append assets dependency before every action assets. If both application and :controller manifest file are not existed, then the manifest file list will be empty at first.
Defined Under Namespace
Modules: ActionViewHelpers, Finder, Manager, Packager Classes: ConfigurationError, Error, FileNotFound, PathInfo, Railtie, UnknownDirectiveError
Constant Summary collapse
- APP_FOLDER =
'app'
- LIB_FOLDER =
'lib'
- VENDOR_FOLDER =
'vendor'
- JS_TYPE =
'javascript'
- JS_EXT =
'js'
- JS_PATH =
'javascripts'
- CSS_TYPE =
'css'
- CSS_EXT =
'css'
- CSS_PATH =
'stylesheets'
- VERSION =
"1.1.1"
Class Method Summary collapse
Class Method Details
.tag(type, url) ⇒ Object
17 18 19 20 21 22 23 24 25 26 |
# File 'lib/view_assets.rb', line 17 def tag(type, url) case type when :js %(<script src="#{url}" type="text/javascript"></script>) when :css %(<link href="#{url}" media="screen" rel="stylesheet" />) else raise Error.new("Unknown tag type") end end |