Module: Ext::UseHelper

Extended by:
Equipment
Defined in:
lib/ext/use_helper.rb

Overview

The UseHelper allows you to define in your view what js and css scripts you're using.

That can then be later used in the layout.

This is useful when you descript external styles.

Example

def layout html do head do javascripts.each { |js| script :type=>'text/javascript', :src=>js } stylesheets.each { |css| link :type=>'text/css', :rel=>'stylesheet', :href=>css } end body { yield } end end

def someview use 'prototype.js', 'layout.css'

...

end

Dependency

  • Equipment
  • AppUtil

TODO

  • More doc

Possible issues

It is possible that the @__flash instance variable is not transmitted well between the controller and the view. This may cause unwanted behavior.

Defined Under Namespace

Modules: Base, Helpers

Constant Summary

Constants included from Equipment

Equipment::DATA_PATH, Equipment::LIB_PATH

Instance Attribute Summary

Attributes included from Equipment

#debug

Method Summary

Methods included from Equipment

dependencies, depends_on, equip, equip_all, global_extensions, included