Ticket #402 (closed enhancement: fixed)

Opened 1 year ago

Last modified 1 year ago

checkbox_field is too magic (merb_helper)

Reported by: gtd..@spearhead.de Assigned to:
Priority: medium Milestone: The Future
Component: Plugins Keywords: merb_helper checkbox_field
Cc:

Description

I was trying to implement very simple list selection functionality with checkboxes, but the magic nature of checkbox_field prevents putting arbitrary values in :value. The patch adds an attribute :boolean to the checkbox_field method. If :boolean is not set or set to true, the old behavior remains. If the attribute is set to false, a simple checkbox is generated from the :name and :value attributes.

Attachments

merb_helpers+checkbox_field.diff (2.5 kB) - added by gtd..@spearhead.de on 01/05/08 08:19:24.
Patch v2 (now the doc part should be correct)

Change History

01/05/08 08:19:24 changed by gtd..@spearhead.de

  • attachment merb_helpers+checkbox_field.diff added.

Patch v2 (now the doc part should be correct)

01/05/08 08:57:22 changed by rogelio.samo..@gmail.com

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

(In [1169]) - Allows checkbox_field to have values other than 1/0 when "checked" - All specs pass and completely backwards compatible. Closes #402 [gtd..@spearhead.de]