vidibus-permalink 1.3.0 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/vidibus/permalink/mongoid.rb +12 -0
- data/lib/vidibus/permalink/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bac98f8cc4d3e6a7e575bab1edf72c67eb04eeffde1a0715d7ab8232037db918
|
4
|
+
data.tar.gz: 1d4204aea086cb8a69017ae2f0b3985839895c949f6a2dd9a780a461b41ff6bb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ff6e288516dd3863daedf254e561b1f7257d0e9cf49254c07295bf3f334ab962b6a96838076ee4653cfbd7f2e4a8d3ca49bc1f71969dbef7e7132c9666fe6ce0
|
7
|
+
data.tar.gz: ca8be7dde7894295b1ed8cdd7356be5ef24875138773df1dccd841cd2f83ee9d69c616ffe5ac5d3bacf0092998dce1dd2cc2ed219bbf08eade1c9c5efab282ad
|
@@ -40,6 +40,18 @@ module Vidibus
|
|
40
40
|
end
|
41
41
|
end
|
42
42
|
|
43
|
+
# Ensure that a current permalink object exists for this record.
|
44
|
+
def ensure_permalink_object
|
45
|
+
if permalink_repository
|
46
|
+
permalink_object || begin
|
47
|
+
obj = permalink_object_by_value(permalink)
|
48
|
+
obj.sanitize_value!
|
49
|
+
obj.current!
|
50
|
+
obj.save
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
43
55
|
# Returns the defined permalink repository object.
|
44
56
|
def permalink_repository
|
45
57
|
@permalink_repository ||= begin
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vidibus-permalink
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andre Pankratz
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-10-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|