sibu 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/sibu/page.rb +2 -2
- data/lib/sibu/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: 4753bc0d6b2ac1644d0df9dc61ec9e4d58e4f4e6
|
4
|
+
data.tar.gz: 22f1aeafcf2704c1cfeb542d785f34e578f4c533
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f66b53b0a3527bc86e549a62f8de8880618ce11b57ee0477ba6c7088781f3bc29a27ef0aa1481bbeff7f5c436feda5ec7ea455c445bb79201e6756a1e4874702
|
7
|
+
data.tar.gz: ca008929497da27ae45ff05986ed7c24656d42c468f083520d96599925ca09d1a49846d96cf7297b2dcc9dbd313135413e1bb7c701d3f1a57877577d85d91721
|
data/app/models/sibu/page.rb
CHANGED
@@ -10,8 +10,8 @@ module Sibu
|
|
10
10
|
validates_presence_of :name, :site
|
11
11
|
|
12
12
|
def self.lookup(domain_name, page_path)
|
13
|
-
joins(:site).where("sibu_sites.domain = ? AND ((sibu_sites.version = ? AND sibu_pages.path = ?) OR sibu_pages.path = LTRIM(REPLACE(?, sibu_sites.version, ''), '/'))",
|
14
|
-
domain_name, Sibu::Site::DEFAULT_VERSION, page_path, page_path).first
|
13
|
+
joins(:site).where("sibu_sites.domain = ? AND ((sibu_sites.version = ? AND COALESCE(sibu_pages.path, '') = ?) OR sibu_pages.path = LTRIM(REPLACE(?, sibu_sites.version, ''), '/'))",
|
14
|
+
domain_name, Sibu::Site::DEFAULT_VERSION, page_path.nil? ? '' : page_path.strip, page_path.nil? ? '' : page_path.strip).first
|
15
15
|
end
|
16
16
|
|
17
17
|
def save_and_init
|
data/lib/sibu/version.rb
CHANGED