Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #9808 (closed enhancement: fixed)

Opened 2 years ago

Last modified 2 years ago

[PATCH] observe_field should document the :function option better

Reported by: RubyRedRick Assigned to: core
Priority: normal Milestone: 2.x
Component: ActionPack Version: edge
Severity: normal Keywords: documentation verified
Cc:

Description

The :function option in observe_field is used to allow arbitrary javascript code to be executed in lieu of an Ajax call back to the server.

It is not well-documented.

I've attached a doc-only patch which describes how the value of this option is used.

Attachments

observe_field_doc.diff (1.6 kB) - added by RubyRedRick on 10/07/07 16:32:01.
Document only patch for actionpack/lib/actionview/helpers/prototype_helper.rb
observe_field_doc.2.diff (1.5 kB) - added by danger on 10/09/07 18:17:06.
updated patch and fixed syntax

Change History

10/07/07 16:32:01 changed by RubyRedRick

  • attachment observe_field_doc.diff added.

Document only patch for actionpack/lib/actionview/helpers/prototype_helper.rb

(in reply to: ↑ description ) 10/07/07 21:13:01 changed by labria

Yes, such things should be documented better, thanks!

10/08/07 21:39:36 changed by danger

  • keywords set to documentation patch.
  • type changed from defect to enhancement.

+1 Good work!

labria: want to add a +1 to this ticket?

10/08/07 21:55:05 changed by labria

+1 Sure, i just forgot.

10/08/07 22:03:18 changed by pager

+1 Thanks!

10/08/07 22:15:33 changed by danger

  • keywords changed from documentation patch to documentation verified.
  • summary changed from observe_field should document the :function option better to [PATCH] observe_field should document the :function option better.

10/09/07 16:10:19 changed by mikong

There's a typo in the sample code in the doc. frequency should be a symbol right?

10/09/07 18:09:43 changed by danger

Good catch mikong - you're right. RubyRedRick: could you change 'frequency' to ':frequency' ?

10/09/07 18:17:06 changed by danger

  • attachment observe_field_doc.2.diff added.

updated patch and fixed syntax

10/09/07 18:17:45 changed by danger

Nevermind, I fixed it and regenerated the patch from the right root directory. It's all set to go in. Good work RubyRedRick!

10/15/07 05:03:27 changed by nzkoz

  • status changed from new to closed.
  • resolution set to fixed.

(In [7901]) Enhance documentation for observe_field. Closes #9808 [RubyRedRick, danger]