lalala 4.0.0.dev.189 → 4.0.0.dev.190
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/lalala/pages/page_type_constraint.rb +7 -4
- data/lib/lalala/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9e2dec1469dbaf5865b65830c9c6458137461bf7
|
4
|
+
data.tar.gz: 6e0c7d2983af923c167d973496f0121ef886de68
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c52478d1b09fddff1000e11093d588230ebd18167f607cfe1c20ae37444a09a75ef4ad336903ea83e64175898f424330501a42b543e66f66a9453dbd5276b4f1
|
7
|
+
data.tar.gz: 9071aa11a6e348121602a4d1de07f75910a1a474a2a04182ea04b71d5c20943fba18e9d587c12f17b5d22c37584f2280f652cbf4bd983d73cf452fdd38b98a07
|
@@ -1,16 +1,19 @@
|
|
1
1
|
class Lalala::Pages::PageTypeConstraint
|
2
2
|
|
3
3
|
def initialize(type)
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
4
|
+
type = "#{type}_page"
|
5
|
+
type = type.classify
|
6
|
+
|
7
|
+
while type.ends_with?("PagePage")
|
8
|
+
type = type[0..-5]
|
8
9
|
end
|
9
10
|
|
11
|
+
type = type.constantize
|
10
12
|
@type = type
|
11
13
|
end
|
12
14
|
|
13
15
|
def matches?(request)
|
16
|
+
return false if env["action_dispatch.exception"]
|
14
17
|
request.env['lalala.page'] and @type === request.env['lalala.page']
|
15
18
|
end
|
16
19
|
|
data/lib/lalala/version.rb
CHANGED