volt-fields 0.0.11 → 0.0.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/app/fields/controllers/text_controller.rb +8 -7
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 98621a6b4c86d23287a5653866aae56e8b474e95
|
4
|
+
data.tar.gz: 8dc3ebb0842b4ab9274d0c670bfedaf0369dfd01
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f25b3abee0e4db84c181314abb11fb5f4d9ecf2ad66e435e14d852fd20858274a9924230ccaffab1e3235f5d429f6d24a964ebc6b2e7df17cc50eba6fa680c00
|
7
|
+
data.tar.gz: 8b0ddacfa5798d855911fa73e646479701369ece717da7965498784ff5c65367b54d0b567656fcd21578113f9faceb73c9e3f74d3f9ca9f8b89582357392cc6e
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.12
|
@@ -8,13 +8,14 @@ module Fields
|
|
8
8
|
@type = 'text'
|
9
9
|
end
|
10
10
|
|
11
|
-
# Find the parent reactive value that produced the value
|
12
|
-
# (usually just model._field)
|
13
|
-
@model = attrs.value_parent
|
14
|
-
|
15
11
|
# Get the name of the field by looking at the method scope
|
16
12
|
@field_name = attrs.value_last_method.gsub(/^[_]/, '')
|
13
|
+
end
|
17
14
|
|
15
|
+
# Find the parent reactive value that produced the value
|
16
|
+
# (usually just model._field)
|
17
|
+
def model
|
18
|
+
attrs.value_parent
|
18
19
|
end
|
19
20
|
|
20
21
|
def label
|
@@ -23,16 +24,16 @@ module Fields
|
|
23
24
|
|
24
25
|
# Find the errors for this field
|
25
26
|
def errors
|
26
|
-
|
27
|
+
model.marked_errors[@field_name]
|
27
28
|
end
|
28
29
|
|
29
30
|
# When a field goes out of focus, then we want to start checking a field
|
30
31
|
def blur
|
31
|
-
|
32
|
+
attrs.value_parent.mark_field!(@field_name)
|
32
33
|
end
|
33
34
|
|
34
35
|
def marked
|
35
|
-
|
36
|
+
model.marked_fields[@field_name]
|
36
37
|
end
|
37
38
|
end
|
38
39
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: volt-fields
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Stout
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-11-
|
11
|
+
date: 2014-11-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: volt
|