diff options
author | Erik St. Martin <alakriti@gmail.com> | 2010-01-26 12:40:29 -0500 |
---|---|---|
committer | Stefan Penner <stefan.penner@gmail.com> | 2010-01-27 12:44:35 -0600 |
commit | f661a3bc599ac336aeaf643a8d1d388fe905a07d (patch) | |
tree | 7d0e0557f4dc531106f56ea6963c6ab8326a69b3 /actionpack/lib | |
parent | a6cd35ba68c6d210f097a37ff737bbc1e5c61972 (diff) | |
download | rails-f661a3bc599ac336aeaf643a8d1d388fe905a07d.tar.gz rails-f661a3bc599ac336aeaf643a8d1d388fe905a07d.tar.bz2 rails-f661a3bc599ac336aeaf643a8d1d388fe905a07d.zip |
removing container inline js function of observed elements :function callback
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 |