Module: CMS::JavascriptHelper
- Defined in:
- app/helpers/cms/javascript_helper.rb
Instance Method Summary collapse
- #cms_data_js(name, data = true, options = {}) ⇒ Object
- #cms_data_js_html(name, data = true, options = {}) ⇒ Object
Instance Method Details
#cms_data_js(name, data = true, options = {}) ⇒ Object
3 4 5 |
# File 'app/helpers/cms/javascript_helper.rb', line 3 def cms_data_js(name, data = true, = {}) { "data-js-#{name}" => data.to_json }.merge() end |
#cms_data_js_html(name, data = true, options = {}) ⇒ Object
7 8 9 |
# File 'app/helpers/cms/javascript_helper.rb', line 7 def cms_data_js_html(name, data = true, = {}) CMS. cms_data_js(name, data, ) end |