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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1bf47f9b03f71b26914cb065f61eaef1cabe0447
4
- data.tar.gz: 0e83d7f39236eb816e75c291cf38661bf4876844
3
+ metadata.gz: 98621a6b4c86d23287a5653866aae56e8b474e95
4
+ data.tar.gz: 8dc3ebb0842b4ab9274d0c670bfedaf0369dfd01
5
5
  SHA512:
6
- metadata.gz: 87535199646ff853aae5f1f0eceacb93e614ae13fd1f1fb333cbe2ba95e865d28136e8f08dd784f0ac4df4a8e63510833b1209ec5f77ace9c02fcd2a0081345a
7
- data.tar.gz: fbedcb315db432ff8bf717c56e3d53324118af87be3f93372798863d6f54277dd732d821f487b693427afdc807a6aa8a0ab9fe99e18755ddb1e178268bb41c24
6
+ metadata.gz: f25b3abee0e4db84c181314abb11fb5f4d9ecf2ad66e435e14d852fd20858274a9924230ccaffab1e3235f5d429f6d24a964ebc6b2e7df17cc50eba6fa680c00
7
+ data.tar.gz: 8b0ddacfa5798d855911fa73e646479701369ece717da7965498784ff5c65367b54d0b567656fcd21578113f9faceb73c9e3f74d3f9ca9f8b89582357392cc6e
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.11
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
- @model.marked_errors[@field_name]
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
- @model.mark_field!(@field_name)
32
+ attrs.value_parent.mark_field!(@field_name)
32
33
  end
33
34
 
34
35
  def marked
35
- @model.marked_fields[@field_name]
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.11
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-08 00:00:00.000000000 Z
11
+ date: 2014-11-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: volt