bjornblomqvist-AppFormBuilder 0.1.0 → 0.1.1

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.
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{AppFormBuilder}
8
- s.version = "0.1.0"
8
+ s.version = "0.1.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Darwin"]
12
- s.date = %q{2009-09-14}
12
+ s.date = %q{2009-09-17}
13
13
  s.description = %q{TODO: longer description of your gem}
14
14
  s.email = %q{darwin.git@marianna.se}
15
15
  s.extra_rdoc_files = [
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.1.1
@@ -76,12 +76,22 @@ class AppFormBuilder < ActionView::Helpers::FormBuilder
76
76
  end.join " "
77
77
  end
78
78
 
79
- def boolean_filter(field, options = {})
80
- collection_select field, [['Ja/Nej', ''], ['Ja', 'true'], ['Nej', 'false']], :last, :first, options
81
- end
82
-
83
- def language_select(field, options = {})
84
- collection_select field, ['sv', 'en'], :to_s, :to_s, options
79
+ end
80
+
81
+
82
+ # Monkey-patch to force all input elements to include a value attribute,
83
+ # even when the model value is nil. Ugly but effective (I think). Use at
84
+ # your own risk.
85
+ raise 'Ouch' unless ActionView && ActionView::Helpers && ActionView::Helpers::InstanceTag
86
+
87
+ module ActionView
88
+ module Helpers
89
+ class InstanceTag #:nodoc:
90
+
91
+ def value_before_type_cast(object)
92
+ self.class.value_before_type_cast(object, @method_name) || ''
93
+ end
94
+
95
+ end
85
96
  end
86
-
87
97
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bjornblomqvist-AppFormBuilder
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Darwin
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-09-14 00:00:00 -07:00
12
+ date: 2009-09-17 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency