amount_field 1.4.1 → 1.4.2

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -1,3 +1,7 @@
1
+ == 1.4.1 2010-05-11
2
+
3
+ * Don't set default dom Id for FormBuilder amount_field, use Rails default or use given one.
4
+
1
5
  == 1.4.1 2010-04-23
2
6
 
3
7
  * Method amount_field considers given option "name" and "id":
data/README.rdoc CHANGED
@@ -14,7 +14,7 @@ As Gem:
14
14
 
15
15
  As plugin:
16
16
 
17
- $ script/plugin install git://github.com/thomasbaustert/amount_field.git -r 2.3
17
+ $ script/plugin install git://github.com/thomasbaustert/amount_field.git
18
18
 
19
19
  == Example
20
20
 
@@ -170,6 +170,7 @@ See test_helper.rb for details.
170
170
  == Credits
171
171
 
172
172
  * Michael Schiller (for feedback and ideas)
173
+ * Clements Teichmann (consider option 'name' and 'id')
173
174
 
174
175
  == Contact
175
176
 
data/Rakefile CHANGED
@@ -2,7 +2,7 @@ require 'rubygems'
2
2
  require 'rake'
3
3
  require 'echoe'
4
4
 
5
- Echoe.new('amount_field', '1.4.1') do |p|
5
+ Echoe.new('amount_field', '1.4.2') do |p|
6
6
  p.description = "Rails gem/plugin that accepts (amount) values in german or us format like 1.234,56 or 1,234.56"
7
7
  p.url = "http://github.com/thomasbaustert/amount_field"
8
8
  p.author = "Thomas Baustert"
data/amount_field.gemspec CHANGED
@@ -2,11 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{amount_field}
5
- s.version = "1.4.1"
5
+ s.version = "1.4.2"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Thomas Baustert"]
9
- s.date = %q{2010-04-23}
9
+ s.date = %q{2010-05-11}
10
10
  s.description = %q{Rails gem/plugin that accepts (amount) values in german or us format like 1.234,56 or 1,234.56}
11
11
  s.email = %q{ business@thomasbaustert.de}
12
12
  s.extra_rdoc_files = ["README.rdoc", "lib/amount_field.rb", "lib/amount_field/configuration.rb", "lib/amount_field/form_helper.rb", "lib/amount_field/form_tag_helper.rb", "lib/amount_field/validations.rb"]
@@ -53,9 +53,10 @@ module AmountField #:nodoc:
53
53
  options[:value] ||= object.send("#{AmountField::Configuration.prefix}_#{method}") || object.send("#{method}_before_type_cast")
54
54
  end
55
55
 
56
+ # Note: we don't set options[:id] here, because caller or Rails knows best what to do.
57
+ # We accidentally set it to "foo[bar]_name" instead of "foo_bar_name".
56
58
  options[:name] ||= "#{object_name}[#{AmountField::Configuration.prefix}_#{method}]"
57
59
  options[:class] = "#{options[:class]} #{AmountField::Configuration.css_class}"
58
- options[:id] ||= "#{object_name}_#{method}"
59
60
 
60
61
  text_field(method, options)
61
62
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 1
7
7
  - 4
8
- - 1
9
- version: 1.4.1
8
+ - 2
9
+ version: 1.4.2
10
10
  platform: ruby
11
11
  authors:
12
12
  - Thomas Baustert
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-04-23 00:00:00 +02:00
17
+ date: 2010-05-11 00:00:00 +02:00
18
18
  default_executable:
19
19
  dependencies: []
20
20