Module: PluggableJs::Helpers::View
- Defined in:
- lib/pluggable_js/helpers.rb
Instance Method Summary collapse
Instance Method Details
#javascript_pluggable_tag ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/pluggable_js/helpers.rb', line 5 def javascript_pluggable_tag controller = params[:controller] action = define_pair_action javascript_tag( "(function() { var pluggableFunction = window['#{controller}##{action}']; if (typeof(pluggableFunction) === 'function') { pluggableFunction(#{@pluggable_js_data}); } }).call();" ) end |