Created
May 26, 2009 08:31
-
-
Save qoobaa/117957 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 06ae0d5c71cf9c5d06badd4927d59f4fe821d1c8 Mon Sep 17 00:00:00 2001 | |
From: =?utf-8?q?Jakub=20Ku=C5=BAma?= <[email protected]> | |
Date: Tue, 26 May 2009 10:29:17 +0200 | |
Subject: [PATCH] fixed field_set_and_list_wrapping_for_method to use join | |
--- | |
lib/formtastic.rb | 2 ++ | |
1 files changed, 2 insertions(+), 0 deletions(-) | |
diff --git a/lib/formtastic.rb b/lib/formtastic.rb | |
index 1c39142..cc05a6e 100644 | |
--- a/lib/formtastic.rb | |
+++ b/lib/formtastic.rb | |
@@ -959,6 +959,8 @@ module Formtastic #:nodoc: | |
# method. This methods is currently used by radio and datetime inputs. | |
# | |
def field_set_and_list_wrapping_for_method(method, options, contents) | |
+ contents = contents.join if contents.respond_to?(:join) | |
+ | |
template.content_tag(:fieldset, | |
%{<legend>#{self.label(method, options.slice(:label, :required).merge!(:as_span => true))}</legend>} + | |
template.content_tag(:ol, contents) | |
-- | |
1.6.0.4 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment