wordjelly-auth 1.3.8 → 1.3.9

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
  SHA256:
3
- metadata.gz: 5d2e0fd940bcca477949235458e3c1fce893a501d35b85996a257c49bd932499
4
- data.tar.gz: fef77673e513a06a8cae5085625969b470ced48d89b20e849225be4d255a9c17
3
+ metadata.gz: 0f4556edfc53178f58ffc5e97b4840d92ffcdf2bd7c2b5f5a034055ddf62fe70
4
+ data.tar.gz: d96c660b8f0ded7cce2eacb969b0fea1a8810b2af3833aa7266ce719cf41b32b
5
5
  SHA512:
6
- metadata.gz: b6befec4e9248a7f8387398ac432bf727db4aba01ce915ddd87009122255f6f8bc97408bf0808e28e46c7f06c79bf3a5d642dea46a8537624a1441dcc5511625
7
- data.tar.gz: c28404904e1663146a1e11d9253a547c8b3856cb426d2c0e449222da82c7c425a564ad3bb9f27e28d4393b28bae5fe2e9c1bd10781ae71ee6684e0e7d3b1c27d
6
+ metadata.gz: 1940a2b7323358910169b7f5aeadbfa79d03b2058a938745fd491e943f30ab46b3b41ce62e023fe27a3cb3c0ecddc8bf680f945553b48a4fb6a13531583d3653
7
+ data.tar.gz: 7bbc3b5fbf605dfa2a78c2eb81cf83510d96126033f8c17c4edfe472d18e41b38ad561564a5f755643ef1b81e73c25c27f440c0751143d5229f1c3adaac33f1e
@@ -8,14 +8,12 @@ module Auth::Concerns::Shopping::BarCodeConcern
8
8
 
9
9
  after_find do |document|
10
10
  ## look for a barcode
11
- =begin
12
11
  unless document.bar_code_tag
13
12
  bar_codes = Auth::Shopping::BarCode.where(:assigned_to_object_id => document.id.to_s, :assigned_to_object_class => document.class.name)
14
13
  if bar_codes.size == 1
15
14
  document.bar_code_tag = bar_codes.first.bar_code_tag
16
15
  end
17
16
  end
18
- =end
19
17
  end
20
18
 
21
19
  ## so if i want to assign a barcode , i.e the same barcode to the unit.
@@ -48,6 +46,8 @@ module Auth::Concerns::Shopping::BarCodeConcern
48
46
  document.errors.add(:bar_code_tag,"could not clear the barcode tag. Please try again later")
49
47
  else
50
48
  puts "clear barcode succeeds."
49
+ ## remove the barcode from the object, that was loaded at find.
50
+ document.bar_code_tag = nil
51
51
  end
52
52
  end
53
53
  end
@@ -58,16 +58,28 @@ module Auth::Concerns::Shopping::BarCodeConcern
58
58
  after_save do |document|
59
59
 
60
60
  puts "Came to after_Save product."
61
- unless document.bar_code_tag.nil?
62
- puts "bar code tag is not nil"
61
+
62
+ unless document.bar_code_tag.blank?
63
+
64
+ #puts "bar code tag is not nil"
65
+ #puts "barcode tag is:"
66
+
67
+ #puts "-----------|||||||||||||||||||||||||"
68
+ #puts document.bar_code_tag.to_s
69
+ #puts "-----------|||||||||||||||||||||||||"
70
+
63
71
  if bar_code_object = Auth::Shopping::BarCode.upsert_and_assign_object(self)
64
- puts "upsert and assign works."
72
+ #puts "upsert and assign works."
73
+ #puts "self barcode is:"
74
+ #puts self.bar_code_tag.to_s
65
75
  else
66
76
  document.errors.add(:bar_code_tag,"the bar code tag could not be persisted")
67
77
  end
68
78
 
69
79
  end
80
+
70
81
  end
82
+
71
83
  end
72
84
 
73
85
  end
data/lib/auth/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Auth
2
- VERSION = "1.3.8"
2
+ VERSION = "1.3.9"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wordjelly-auth
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.8
4
+ version: 1.3.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - bhargav
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-12-24 00:00:00.000000000 Z
11
+ date: 2018-12-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: xpath