protected Method

JavaScriptHelper.array_or_string_for_javascript(option)

There's no documentation for this item.

Source Code

# File action_view/helpers/javascript_helper.rb, line 200
def array_or_string_for_javascript(option)
  js_option = if option.kind_of?(Array)
    "['#{option.join('\',\'')}']"
  elsif !option.nil?
    "'#{option}'"
  end
  js_option
end
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.