infopark_cloud_connector 6.8.0.480.261594408 → 6.8.0.498.46559598
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/rails_connector/obj.rb +19 -1
- metadata +9 -9
data/lib/rails_connector/obj.rb
CHANGED
@@ -167,7 +167,11 @@ module RailsConnector
|
|
167
167
|
|
168
168
|
def self.compute_type(type_name)
|
169
169
|
@compute_type_cache ||= {}
|
170
|
-
@compute_type_cache
|
170
|
+
@compute_type_cache[type_name] ||= try_type { type_name.constantize } || self
|
171
|
+
end
|
172
|
+
|
173
|
+
def self.reset_type_cache
|
174
|
+
@compute_type_cache = {}
|
171
175
|
end
|
172
176
|
|
173
177
|
# return the Obj that is the parent of this Obj.
|
@@ -283,6 +287,20 @@ module RailsConnector
|
|
283
287
|
self == self.class.homepage
|
284
288
|
end
|
285
289
|
|
290
|
+
# This method is used to calculate part a part of a URL of an obj.
|
291
|
+
#
|
292
|
+
# The routing schema: <code><em><obj.id></em>/<em><obj.slug></em></code>
|
293
|
+
#
|
294
|
+
# The default is {http://apidock.com/rails/ActiveSupport/Inflector/parameterize parameterize}
|
295
|
+
# on +obj.title+.
|
296
|
+
#
|
297
|
+
# You can customize this part by overwriting +obj.slug+ in {ObjExtentions}.
|
298
|
+
# @return [String]
|
299
|
+
# @api public
|
300
|
+
def slug
|
301
|
+
(title || '').parameterize
|
302
|
+
end
|
303
|
+
|
286
304
|
# Returns the title of the content or the name.
|
287
305
|
# @return [String]
|
288
306
|
# @api public
|
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: infopark_cloud_connector
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 93119979
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 6
|
8
8
|
- 8
|
9
9
|
- 0
|
10
|
-
-
|
11
|
-
-
|
12
|
-
version: 6.8.0.
|
10
|
+
- 498
|
11
|
+
- 46559598
|
12
|
+
version: 6.8.0.498.46559598
|
13
13
|
platform: ruby
|
14
14
|
authors:
|
15
15
|
- Infopark AG
|
@@ -17,7 +17,7 @@ autorequire:
|
|
17
17
|
bindir: bin
|
18
18
|
cert_chain: []
|
19
19
|
|
20
|
-
date: 2012-12-
|
20
|
+
date: 2012-12-13 00:00:00 +01:00
|
21
21
|
default_executable:
|
22
22
|
dependencies:
|
23
23
|
- !ruby/object:Gem::Dependency
|
@@ -57,14 +57,14 @@ dependencies:
|
|
57
57
|
requirements:
|
58
58
|
- - "="
|
59
59
|
- !ruby/object:Gem::Version
|
60
|
-
hash:
|
60
|
+
hash: 93119979
|
61
61
|
segments:
|
62
62
|
- 6
|
63
63
|
- 8
|
64
64
|
- 0
|
65
|
-
-
|
66
|
-
-
|
67
|
-
version: 6.8.0.
|
65
|
+
- 498
|
66
|
+
- 46559598
|
67
|
+
version: 6.8.0.498.46559598
|
68
68
|
version_requirements: *id003
|
69
69
|
name: kvom
|
70
70
|
prerelease: false
|