morse_active_record_helpers 0.1.2 → 0.1.3

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: be0ea1e7f768c683381dc7ca3ccfe96a084ed13e
4
- data.tar.gz: e42ed60c5ff6da04d753eced21221c4446a1e840
3
+ metadata.gz: 06ddf469c0c0ef6aaa959eca6a21500ef3f39524
4
+ data.tar.gz: a585a5a41ef62ffb9b14f3ea5e6f9330f0897238
5
5
  SHA512:
6
- metadata.gz: 318dd3d45f803aef9004f2d8937f550f4723cd3525eeff501437e498b80d200318b6dae31579d4ffdd4ef128e0711e8f2f0889415ddf3044141240cd8901bf59
7
- data.tar.gz: fdb27a50d9267333e983c2792215f38cb6b19e371be31a958faf1e243fc74876255c5e81faa4768174bbb25e35cd5ac3a46ba9dd2d1e8b0856b0df07606dd88b
6
+ metadata.gz: 6c6f0900f5a80adf0a40835231e21ff4c242fd45e446ae871a181d4ff61ddf1396517a7a2bdc79ef58b4247639812e19277430222316e3106d1594fca3506aa4
7
+ data.tar.gz: d7f57909d7c1672daca776a06d6c7b6e01d7250f42fff0bf93b3b7abce676aa6ac9577f70bc6de64fef8d0560ad44ff0335df58e3593b082a13507d75b7b139f
@@ -15,6 +15,15 @@ module MorseActiveRecordHelpers
15
15
  end
16
16
  end
17
17
 
18
+ def correct_chronological_order(start, finish)
19
+ if self.send(start) && self.send(finish)
20
+ if self.send(start) > self.send(finish)
21
+ errors.add(:base,"#{finish.to_s.humanize} can not be before #{start.to_s.humanize}")
22
+ return false
23
+ end
24
+ end
25
+ end
26
+
18
27
  def blank_to_nil(thing)
19
28
  if self.send(thing).blank?
20
29
  self.send(thing.to_s+'=',nil)
@@ -51,14 +60,6 @@ module MorseActiveRecordHelpers
51
60
  end
52
61
  end
53
62
 
54
- def correct_chronological_order(start, finish)
55
- if self.send(start) && self.send(finish)
56
- if self.send(start) > self.send(finish)
57
- errors.add(:base,"#{finish} can not be before #{start}")
58
- return false
59
- end
60
- end
61
- end
62
63
 
63
64
  def there_can_be_only_one(thing)
64
65
  if new_record?
@@ -1,3 +1,3 @@
1
1
  module MorseActiveRecordHelpers
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: morse_active_record_helpers
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Terry S