effective_resources 0.7.4 → 0.7.5
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2b7ea13c4da05e3fbac7d0b7d86865529af893cd
|
4
|
+
data.tar.gz: dccdd1e341a27700e93dcbf4f951c1207d514990
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0b6adb87dafcdb775a71850fe8015a6b110b9c52157db64e7e65fac12cfa1f7fd6a908d1b87094b1967329bbdb1235f0a0f2561f85d0ce3bd8d9e49a1ddb158f
|
7
|
+
data.tar.gz: e25c5f12ed3d2ca3bbef12ea2e4c7292f1df0f7c18de31072532ed6f7b376eccf286bd1fd64548087823fce471cfcf3405332b4ec40d9d41eff4e8cf8aa17e75
|
@@ -109,7 +109,9 @@ module Effective
|
|
109
109
|
raise 'expected a label or block' unless (label || block_given?)
|
110
110
|
|
111
111
|
instance_exec do
|
112
|
-
before_action(opts)
|
112
|
+
before_action(opts) do
|
113
|
+
@page_title ||= (block_given? ? instance_exec(&block) : label)
|
114
|
+
end
|
113
115
|
end
|
114
116
|
end
|
115
117
|
|
@@ -112,7 +112,8 @@ module Effective
|
|
112
112
|
when :phone
|
113
113
|
digits = value.to_s.gsub(/\D/, '').chars
|
114
114
|
digits = (digits.first == '1' ? digits[1..10] : digits[0..9]) # Throw away a leading 1
|
115
|
-
|
115
|
+
|
116
|
+
return nil unless digits.length == 10
|
116
117
|
|
117
118
|
"(#{digits[0..2].join}) #{digits[3..5].join}-#{digits[6..10].join}"
|
118
119
|
when :integer
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: effective_resources
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Code and Effect
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-12-
|
11
|
+
date: 2017-12-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|