Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

example provided now adds a <label for="field_id"> and a <span id="fi…

…eld_id">

Signed-off-by: Justin French <justin@indent.com.au>
  • Loading branch information...
commit 348258079f5af1318179471f375e0a51793fe5c5 1 parent f1154cc
@markmansour markmansour authored committed
Showing with 4 additions and 4 deletions.
  1. +4 −4 README.textile
View
8 README.textile
@@ -201,10 +201,10 @@ module JustinFrench #:nodoc:
class FancySemanticFormBuilder < SemanticFormBuilder
# new method to be added allowing full control over the label and value
- def label_and_value(label_text, value, options = {})
- options[:label] = label_text
- content = input_label(label_text, options)
- content += @template.content_tag(:span, value)
+ def label_and_value(label, value, options = {})
+ options[:label] = label
+ content = input_label(label, options)
+ content += @template.content_tag(:span, value, :id => "#{@object_name}_#{label}")
@template.content_tag(:li, content)
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.