l10n 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/l10n/forms.rb +2 -1
- data/lib/l10n/javascript_helper.rb +15 -0
- data/lib/l10n/version.rb +1 -1
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 36eedbf1cd75adfb0c60b0d129946830e3a51061
|
4
|
+
data.tar.gz: 7761e7398936575ac035ed7127f7bad266a79ba2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6a10d2ca1eb7c673c2dd710d09b1a6c991a48d986550f11ea7fa8dacb9acb64efe47711affc4bbea0d7f9aa69981003ffcb41df89f05d3554b01b0c2ad297cb6
|
7
|
+
data.tar.gz: 2ca30313f972703e11c4e22d1704649cd9c7347b1e33f4c236270a2bc34301674f1ce82b38859fc3392ff8d41fb895173fa5bd5391e229c7118fae0c3ec72025
|
data/lib/l10n/forms.rb
CHANGED
@@ -3,7 +3,8 @@ module L10n
|
|
3
3
|
module FormBuilder
|
4
4
|
|
5
5
|
def amount_field(field, options = {})
|
6
|
-
|
6
|
+
format_options = options.extract!(:locale, :precision, :significant, :separator, :delimiter, :strip_insignificant_zeros)
|
7
|
+
value = L10n.number_to_rounded(object.public_send(field), format_options)
|
7
8
|
options[:value] = value
|
8
9
|
options[:class] = "#{options[:class]} amount_field"
|
9
10
|
text_field(field, options)
|
data/lib/l10n/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: l10n
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matthias Grosser
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-08-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: i18n
|
@@ -81,7 +81,7 @@ dependencies:
|
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
84
|
+
name: byebug
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
87
|
- - ">="
|
@@ -143,6 +143,7 @@ files:
|
|
143
143
|
- lib/l10n/forms.rb
|
144
144
|
- lib/l10n/i18n_extensions.rb
|
145
145
|
- lib/l10n/inflections.rb
|
146
|
+
- lib/l10n/javascript_helper.rb
|
146
147
|
- lib/l10n/numeric_column_conversions.rb
|
147
148
|
- lib/l10n/request.rb
|
148
149
|
- lib/l10n/translation_validator.rb
|
@@ -168,7 +169,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
168
169
|
version: '0'
|
169
170
|
requirements: []
|
170
171
|
rubyforge_project:
|
171
|
-
rubygems_version: 2.2.
|
172
|
+
rubygems_version: 2.2.2
|
172
173
|
signing_key:
|
173
174
|
specification_version: 4
|
174
175
|
summary: Extensions for Rails I18n
|