trusty-cms 1.2.28 → 1.2.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +8 -8
- data/app/models/page.rb +7 -4
- data/lib/trusty_cms.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZDljNjFiYjdjZTNiNWViMmUxZjYwZjE0NGViNGViZDg4ZTNmMjMzNQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MTdkODliMmQxM2MwZjg1ZGFmMDY5OTU2Y2UwYTBjNmU1MDRhZDJhZQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YTEwNmZiZTY5ZTQ3YzAwZGNmNTdiZjBmNTM4ZTM5OTM2YmQ1NThjYzhiYjk5
|
10
|
+
ZjJmY2UxNjE2MTViYjVkNDBhZmE0ZTc3NTBkYzRlMTNhZjFhNmZlZjA4MzAw
|
11
|
+
ZGFjMThjZjAyZDlhMjZkMmFjYzc3YWVlNWE3MjE4MzliNDRhYmQ=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MjNiOWQzZDM4ODRkMTM4MGI2YjExZGIwZDM0ZTE2NTk4ZDE3ZmU4MjAxMzdi
|
14
|
+
NTJmNTEyODc2YWFjYWU3NmI5ZDk4Y2EzMmRkODcwNTZjNjUzNzYxYmExMTFj
|
15
|
+
MjE3NzZhYmE5ZDc3NzkzZGFiNzMxNWUyMzE0MDBlOTg3NWU1ZDI=
|
data/app/models/page.rb
CHANGED
@@ -179,23 +179,26 @@ class Page < ActiveRecord::Base
|
|
179
179
|
path = clean_path(path) if clean
|
180
180
|
my_path = self.path
|
181
181
|
if (my_path == path) && (not live or published?)
|
182
|
-
self
|
182
|
+
return self
|
183
183
|
elsif (path =~ /^#{Regexp.quote(my_path)}([^\/]*)/)
|
184
184
|
slug_child = children.find_by_slug($1)
|
185
185
|
if slug_child
|
186
|
-
found = slug_child.
|
186
|
+
found = slug_child.find_by_path(path, live, clean) # TODO: set to find_by_path after deprecation
|
187
187
|
return found if found
|
188
188
|
end
|
189
189
|
children.each do |child|
|
190
|
-
found = child.
|
190
|
+
found = child.find_by_path(path, live, clean) # TODO: set to find_by_path after deprecation
|
191
191
|
return found if found
|
192
192
|
end
|
193
|
+
end
|
194
|
+
unless slug_child
|
193
195
|
file_not_found_types = ([FileNotFoundPage] + FileNotFoundPage.descendants)
|
194
196
|
file_not_found_names = file_not_found_types.collect { |x| x.name }
|
195
197
|
condition = (['class_name = ?'] * file_not_found_names.length).join(' or ')
|
196
198
|
condition = "status_id = #{Status[:published].id} and (#{condition})" if live
|
197
|
-
children.where([condition] + file_not_found_names).first
|
199
|
+
return children.where([condition] + file_not_found_names).first
|
198
200
|
end
|
201
|
+
slug_child
|
199
202
|
end
|
200
203
|
alias_method :find_by_url, :find_by_path
|
201
204
|
|
data/lib/trusty_cms.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: trusty-cms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.29
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- TrustyCms CMS dev team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-04-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: tzinfo
|