diff options
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_view/helpers/ajax_helper.rb | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/actionpack/lib/action_view/helpers/ajax_helper.rb b/actionpack/lib/action_view/helpers/ajax_helper.rb index 5b706ba942..65315fd709 100644 --- a/actionpack/lib/action_view/helpers/ajax_helper.rb +++ b/actionpack/lib/action_view/helpers/ajax_helper.rb @@ -566,7 +566,7 @@ module ActionView attributes = extract_remote_attributes!(options) attributes["data-observe"] = true attributes["data-observed"] = options.delete(:observed) - attributes["data-onobserve"] = create_js_function(callback, "element", "value") if callback + attributes["data-onobserve"] = callback if callback attributes["data-frequency"] = frequency.to_i if frequency && frequency != 0 attributes.delete("data-remote") @@ -577,10 +577,6 @@ module ActionView attributes.delete_if {|key, value| value.nil? } attributes end - - def create_js_function(statements, *arguments) - "function(#{arguments.join(", ")}) {#{statements}}" - end end # TODO: All evaled goes here per wycat |