amount_field 1.4.1 → 1.4.2
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/History.txt +4 -0
- data/README.rdoc +2 -1
- data/Rakefile +1 -1
- data/amount_field.gemspec +2 -2
- data/lib/amount_field/form_helper.rb +2 -1
- metadata +3 -3
data/History.txt
CHANGED
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
|
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.
|
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.
|
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-
|
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
|
-
-
|
9
|
-
version: 1.4.
|
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-
|
17
|
+
date: 2010-05-11 00:00:00 +02:00
|
18
18
|
default_executable:
|
19
19
|
dependencies: []
|
20
20
|
|