site_framework 4.1.0 → 4.1.2
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cb39a285f6315478ee14e0bdaab4745e464db519
|
4
|
+
data.tar.gz: 9f14109056c0a056ae3781a1966b47cd3df19b5f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a4a34b0ac25cef02b5c73f76f7aa7b927473b754bac6e19da2940d8a4c22cef522d0002dda3e05f7536450d003fb44d4597609583e13ebcec8d436a02e9f0cde
|
7
|
+
data.tar.gz: 29d1a16de2f085a4f4f5cdc45b3521409ecdb65469c7397efc9c76b65c0b857ca41fab019916390e620b19f3c9a9ec46e87837a43eb7aef36b7c91c681acf907
|
@@ -3,8 +3,10 @@ module SiteFramework
|
|
3
3
|
extend ActiveSupport::Concern
|
4
4
|
|
5
5
|
included do
|
6
|
-
belongs_to :domain
|
7
|
-
default_scope -> {
|
6
|
+
belongs_to :domain, class_name: '::SiteFramework::Domain'
|
7
|
+
default_scope -> {
|
8
|
+
where(domain_id: SiteFramework::CurrentState.instance.domain)
|
9
|
+
}
|
8
10
|
end
|
9
11
|
end
|
10
12
|
end
|
@@ -1,7 +1,9 @@
|
|
1
|
-
|
2
|
-
#
|
3
|
-
|
4
|
-
|
1
|
+
module SiteFramework
|
2
|
+
# This singleton class act as an temp storage for the
|
3
|
+
# current site and domain
|
4
|
+
class CurrentState
|
5
|
+
include Singleton
|
5
6
|
|
6
|
-
|
7
|
+
attr_accessor :site, :domain, :domain_name
|
8
|
+
end
|
7
9
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: site_framework
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.1.
|
4
|
+
version: 4.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sameer Rahmani
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-04-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|