instance method
build_callbacks
Ruby on Rails 3.0.20
Since v2.2.3 Last seen in v3.0.20Signature
build_callbacks(options)
No documentation comment.
Parameters
-
optionsreq
Source
# File actionpack/lib/action_view/helpers/prototype_helper.rb, line 635
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
Defined in actionpack/lib/action_view/helpers/prototype_helper.rb line 635
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionView::Helpers::PrototypeHelper