semantic_form_for 0.3.2 → 0.3.3

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.
@@ -38,16 +38,17 @@ class SemanticFormFor::FormBuilder < ActionView::Helpers::FormBuilder
38
38
 
39
39
  template.capture_haml do
40
40
  template.haml_tag(:li, :id => _li_id(attribute), :class => classes) do
41
- # check boxes should have their label and input tag in the reverse
42
- # order
43
- if input != :check_box
44
- template.haml_concat self.label(attribute, text)
45
- template.haml_tag :p, error if error.present?
46
- template.haml_concat super(attribute, options)
47
- else
48
- template.haml_concat super(attribute, options)
49
- template.haml_concat self.label(attribute, text)
50
- template.haml_tag :p, error if error.present?
41
+ case input
42
+ when :hidden_field then
43
+ template.haml_concat super(attribute, options)
44
+ when :check_box then
45
+ template.haml_concat super(attribute, options)
46
+ template.haml_concat self.label(attribute, text)
47
+ template.haml_tag :p, error if error.present?
48
+ else
49
+ template.haml_concat self.label(attribute, text)
50
+ template.haml_tag :p, error if error.present?
51
+ template.haml_concat super(attribute, options)
51
52
  end
52
53
  end
53
54
  end
@@ -1,3 +1,3 @@
1
1
  module SemanticFormFor
2
- VERSION = '0.3.2'
2
+ VERSION = '0.3.3'
3
3
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 3
8
- - 2
9
- version: 0.3.2
8
+ - 3
9
+ version: 0.3.3
10
10
  platform: ruby
11
11
  authors:
12
12
  - Stephen Touset
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2011-01-11 00:00:00 -05:00
17
+ date: 2011-01-12 00:00:00 -05:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency