method

build_callbacks

rails latest stable - Class: ActionView::Helpers::JavaScriptHelper

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v1.0.0) is shown here.

build_callbacks(options)
private

No documentation available.

# File actionpack/lib/action_view/helpers/javascript_helper.rb, line 513
      def build_callbacks(options)
        callbacks = {}
        options.each do |callback, code|
          if CALLBACKS.include?(callback)
            name = 'on' + callback.to_s.capitalize
            callbacks[name] = "function(request){#{code}}"
          end
        end
        callbacks
      end