Class: YDIM::Html::View::AjaxValues
- Inherits:
-
HtmlGrid::Component
- Object
- HtmlGrid::Component
- YDIM::Html::View::AjaxValues
- Defined in:
- lib/ydim/html/view/ajax_values.rb
Constant Summary collapse
- HTTP_HEADERS =
{ 'Content-Type' => 'text/javascript; charset=ISO-8859-1', }
Instance Method Summary collapse
Methods inherited from HtmlGrid::Component
#escape, escaped, #format, links, #number_format, #precision
Instance Method Details
#to_html(context) ⇒ Object
14 15 16 17 18 |
# File 'lib/ydim/html/view/ajax_values.rb', line 14 def to_html(context) "var ajaxResponse = {\n" << @model.collect { |key, val| "'#{escape(key)}': '#{escape(val)}'" }.join(",\n") << "\n};" end |