--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Provides functionality for working with JavaScript in your views.
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Ajax, controls and visual effects
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: For information on using Ajax, see ActionView::Helpers::PrototypeHelper.
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: For information on using controls and visual effects, see ActionView::Helpers::ScriptaculousHelper.
  type: :BULLET
- !ruby/struct:SM::Flow::H 
  level: 2
  text: Including the JavaScript libraries into your pages
- !ruby/struct:SM::Flow::P 
  body: "Rails includes the Prototype JavaScript framework and the Scriptaculous JavaScript controls and visual effects library. If you wish to use these libraries and their helpers (ActionView::Helpers::PrototypeHelper and ActionView::Helpers::ScriptaculousHelper), you must do one of the following:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: "Use <tt>&lt;%= javascript_include_tag :defaults %&gt;</tt> in the HEAD section of your page (recommended): This function will return references to the JavaScript files created by the <tt>rails</tt> command in your <tt>public/javascripts</tt> directory. Using it is recommended as the browser can then cache the libraries instead of fetching all the functions anew on every request."
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: "Use <tt>&lt;%= javascript_include_tag 'prototype' %&gt;</tt>: As above, but will only include the Prototype core library, which means you are able to use all basic AJAX functionality. For the Scriptaculous-based JavaScript helpers, like visual effects, autocompletion, drag and drop and so on, you should use the method described above."
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: "Use <tt>&lt;%= define_javascript_functions %&gt;</tt>: this will copy all the JavaScript support functions within a single script block. Not recommended."
  type: :BULLET
- !ruby/struct:SM::Flow::P 
  body: For documentation on <tt>javascript_include_tag</tt> see ActionView::Helpers::AssetTagHelper.
constants: 
- !ruby/object:RI::Constant 
  comment: 
  name: JAVASCRIPT_PATH
  value: File.join(File.dirname(__FILE__), 'javascripts')
full_name: ActionView::Helpers::JavaScriptHelper
includes: 
- !ruby/object:RI::IncludedModule 
  name: PrototypeHelper
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: array_or_string_for_javascript
- !ruby/object:RI::MethodSummary 
  name: button_to_function
- !ruby/object:RI::MethodSummary 
  name: define_javascript_functions
- !ruby/object:RI::MethodSummary 
  name: escape_javascript
- !ruby/object:RI::MethodSummary 
  name: javascript_tag
- !ruby/object:RI::MethodSummary 
  name: link_to_function
- !ruby/object:RI::MethodSummary 
  name: options_for_javascript
name: JavaScriptHelper
superclass: 
