better_form 0.6.5 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -46,7 +46,7 @@ module BetterForm
46
46
  description = generate_description(description)
47
47
 
48
48
  # Join all the parts together to make a better form field!
49
- return label + content_tag(:span, prefix + field + suffix + description) + error_message
49
+ better_form_field(:label => label, :prefix => prefix, :field => field, :suffix => suffix, :description => description, :error_message => error_message)
50
50
  end
51
51
  end
52
52
 
@@ -60,6 +60,10 @@ module BetterForm
60
60
  end
61
61
  end
62
62
 
63
+ def better_form_field(field)
64
+ field[:label] + content_tag(:span, field[:prefix] + field[:field] + field[:suffix] + field[:description]) + field[:error_message]
65
+ end
66
+
63
67
  private
64
68
  def generate_label(field_type, method, label)
65
69
  if label == true
@@ -1,3 +1,3 @@
1
1
  module BetterForm
2
- VERSION = "0.6.5"
2
+ VERSION = "0.7.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: better_form
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.5
4
+ version: 0.7.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-06-14 00:00:00.000000000 +10:00
12
+ date: 2011-08-05 00:00:00.000000000 +10:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
  description: