semantic_form_for 0.4.4 → 0.5.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.
- data/lib/semantic_form_for/form_builder.rb +5 -3
- data/lib/semantic_form_for/version.rb +1 -1
- metadata +26 -36
@@ -13,6 +13,7 @@ class SemanticFormFor::FormBuilder < ActionView::Helpers::FormBuilder
|
|
13
13
|
*ActionView::Helpers::FormBuilder.instance_methods.grep(%r{_box$}),
|
14
14
|
*ActionView::Helpers::FormBuilder.instance_methods.grep(%r{_field$}),
|
15
15
|
*ActionView::Helpers::FormBuilder.instance_methods.grep(%r{_select$}),
|
16
|
+
:select
|
16
17
|
]
|
17
18
|
|
18
19
|
BUTTONS = [ :submit ]
|
@@ -32,6 +33,7 @@ class SemanticFormFor::FormBuilder < ActionView::Helpers::FormBuilder
|
|
32
33
|
define_method input do |attribute, *args, &block|
|
33
34
|
options = args.extract_options!
|
34
35
|
text = args.shift
|
36
|
+
args << options
|
35
37
|
error = self.object.errors[attribute].try(:join, ', ')
|
36
38
|
labeled = text.present? || text.nil?
|
37
39
|
|
@@ -42,15 +44,15 @@ class SemanticFormFor::FormBuilder < ActionView::Helpers::FormBuilder
|
|
42
44
|
template.haml_tag(:li, :id => _li_id(attribute), :class => classes) do
|
43
45
|
case input
|
44
46
|
when :hidden_field then
|
45
|
-
template.haml_concat super(attribute,
|
47
|
+
template.haml_concat super(attribute, *args)
|
46
48
|
when :check_box then
|
47
|
-
template.haml_concat super(attribute,
|
49
|
+
template.haml_concat super(attribute, *args)
|
48
50
|
template.haml_concat self.label(attribute, text) if labeled
|
49
51
|
template.haml_tag :span, error if error.present?
|
50
52
|
else
|
51
53
|
template.haml_concat self.label(attribute, text) if labeled
|
52
54
|
template.haml_tag :span, error if error.present?
|
53
|
-
template.haml_concat super(attribute,
|
55
|
+
template.haml_concat super(attribute, *args)
|
54
56
|
end
|
55
57
|
|
56
58
|
block.call if block
|
metadata
CHANGED
@@ -1,39 +1,34 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: semantic_form_for
|
3
|
-
version: !ruby/object:Gem::Version
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.5.0
|
4
5
|
prerelease:
|
5
|
-
version: 0.4.4
|
6
6
|
platform: ruby
|
7
|
-
authors:
|
7
|
+
authors:
|
8
8
|
- Stephen Touset
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
dependencies:
|
16
|
-
- !ruby/object:Gem::Dependency
|
12
|
+
date: 2011-08-26 00:00:00.000000000Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
17
15
|
name: haml
|
18
|
-
|
19
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
16
|
+
requirement: &70101601750640 !ruby/object:Gem::Requirement
|
20
17
|
none: false
|
21
|
-
requirements:
|
18
|
+
requirements:
|
22
19
|
- - ~>
|
23
|
-
- !ruby/object:Gem::Version
|
24
|
-
version:
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '3.0'
|
25
22
|
type: :runtime
|
26
|
-
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: *70101601750640
|
27
25
|
description: A custom Rails FormBuilder that assumes HTML5. Because HTML4 is for chumps.
|
28
|
-
email:
|
26
|
+
email:
|
29
27
|
- stephen@touset.org
|
30
28
|
executables: []
|
31
|
-
|
32
29
|
extensions: []
|
33
|
-
|
34
30
|
extra_rdoc_files: []
|
35
|
-
|
36
|
-
files:
|
31
|
+
files:
|
37
32
|
- .gitignore
|
38
33
|
- .rvmrc
|
39
34
|
- Gemfile
|
@@ -44,33 +39,28 @@ files:
|
|
44
39
|
- lib/semantic_form_for/railtie.rb
|
45
40
|
- lib/semantic_form_for/version.rb
|
46
41
|
- semantic_form_for.gemspec
|
47
|
-
has_rdoc: true
|
48
42
|
homepage: http://github.com/stouset/semantic_form_for
|
49
43
|
licenses: []
|
50
|
-
|
51
44
|
post_install_message:
|
52
45
|
rdoc_options: []
|
53
|
-
|
54
|
-
require_paths:
|
46
|
+
require_paths:
|
55
47
|
- lib
|
56
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
48
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
57
49
|
none: false
|
58
|
-
requirements:
|
59
|
-
- -
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version:
|
62
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - ! '>='
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0'
|
54
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
63
55
|
none: false
|
64
|
-
requirements:
|
65
|
-
- -
|
66
|
-
- !ruby/object:Gem::Version
|
56
|
+
requirements:
|
57
|
+
- - ! '>='
|
58
|
+
- !ruby/object:Gem::Version
|
67
59
|
version: 1.3.6
|
68
60
|
requirements: []
|
69
|
-
|
70
61
|
rubyforge_project: semantic_form_for
|
71
|
-
rubygems_version: 1.
|
62
|
+
rubygems_version: 1.8.8
|
72
63
|
signing_key:
|
73
64
|
specification_version: 3
|
74
65
|
summary: Simple HTML5-enabled form builder
|
75
66
|
test_files: []
|
76
|
-
|