trusty-multi-site-extension 1.1.4 → 1.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/multi_site/page_extensions.rb +7 -4
- data/trusty-multi-site-extension.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
YTBjODNjMTEzN2UwNzBiZTRlMTM1N2ViZWQ5NTU5OGU1NWE2N2I0Mw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YTBjNGQ0YmJlM2ZjY2E5Y2VhYzViOTdhM2M3OWEwODYwZjk0NmNhMA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MjA3NzRhZTI0OWVlZWFiZTNhYjJiYmMxYjNmOTA5NDMwMDJlNjcxNTI2YTc1
|
10
|
+
ZGI1ZDRhNjE3YzU3N2ViYTMwNjA2NDE1MTEyZGYyNGNhODliNGNjMDJjNWVm
|
11
|
+
OGNjMTcwYzhjM2QwNGEwNTY5Y2RiOGI2YTcyOGQ2M2JhZTIyYjc=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MWI4Mzc3OTdhM2NlYmRhNWZiZTAxYTlhNjA2NWFjNzNkMjM2NDgyMTVhMzU5
|
14
|
+
YzQ0YTYyZDk5MjlhNGM3N2JmODJjY2JkYzM2Y2Y4YzU0ZDIyNzljYWFjODE4
|
15
|
+
NTA5ZDhiNWQ2NWUyNjc0OTA1ZTMzYmIzNjA1N2E0MTIzNzcyYzI=
|
@@ -3,6 +3,7 @@
|
|
3
3
|
module MultiSite::PageExtensions
|
4
4
|
def self.included(base)
|
5
5
|
base.class_eval {
|
6
|
+
include InstanceMethods
|
6
7
|
alias_method_chain :url, :sites
|
7
8
|
mattr_accessor :current_site
|
8
9
|
belongs_to :site
|
@@ -11,10 +12,6 @@ module MultiSite::PageExtensions
|
|
11
12
|
base.extend ClassMethods
|
12
13
|
class << base
|
13
14
|
|
14
|
-
def associate_with_site
|
15
|
-
self.site_id = Page.current_site.site_id if self.site_id.nil?
|
16
|
-
end
|
17
|
-
|
18
15
|
def find_by_path(path, live=true)
|
19
16
|
root = homepage
|
20
17
|
raise Page::MissingRootPageError unless root
|
@@ -28,6 +25,12 @@ module MultiSite::PageExtensions
|
|
28
25
|
end
|
29
26
|
end
|
30
27
|
end
|
28
|
+
|
29
|
+
module InstanceMethods
|
30
|
+
def associate_with_site
|
31
|
+
self.site_id = self.parent.site.id if self.site_id.nil?
|
32
|
+
end
|
33
|
+
end
|
31
34
|
|
32
35
|
module ClassMethods
|
33
36
|
|
@@ -4,7 +4,7 @@ require "trusty-multi-site-extension"
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |s|
|
6
6
|
s.name = "trusty-multi-site-extension"
|
7
|
-
s.version = "1.1.
|
7
|
+
s.version = "1.1.5"
|
8
8
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
9
9
|
s.authors = ["Eric Sipple"]
|
10
10
|
s.date = %q{2014-10-07}
|