Skip to content

Commit

Permalink
Remove observe_field :on option as prototype no longer supports it [#…
Browse files Browse the repository at this point in the history
…1088 state:resolved]
  • Loading branch information
fcheung authored and lifo committed Dec 21, 2008
1 parent 276ea48 commit 40247a8
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions actionpack/lib/action_view/helpers/prototype_helper.rb
Expand Up @@ -531,11 +531,6 @@ def remote_function(options)
# is shorthand for
# :with => "'name=' + value"
# This essentially just changes the key of the parameter.
# <tt>:on</tt>:: Specifies which event handler to observe. By default,
# it's set to "changed" for text fields and areas and
# "click" for radio buttons and checkboxes. With this,
# you can specify it instead to be "blur" or "focus" or
# any other event.
#
# Additionally, you may specify any of the options documented in the
# <em>Common options</em> section at the top of this document.
Expand All @@ -548,11 +543,6 @@ def remote_function(options)
# :url => 'http://example.com/books/edit/1',
# :with => 'title'
#
# # Sends params: {:book_title => 'Title of the book'} when the focus leaves
# # the input field.
# observe_field 'book_title',
# :url => 'http://example.com/books/edit/1',
# :on => 'blur'
#
def observe_field(field_id, options = {})
if options[:frequency] && options[:frequency] > 0
Expand Down Expand Up @@ -1094,7 +1084,6 @@ def build_observer(klass, name, options = {})
javascript << "#{options[:frequency]}, " if options[:frequency]
javascript << "function(element, value) {"
javascript << "#{callback}}"
javascript << ", '#{options[:on]}'" if options[:on]
javascript << ")"
javascript_tag(javascript)
end
Expand Down

0 comments on commit 40247a8

Please sign in to comment.