panda_pal 5.12.1 → 5.12.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/panda_pal/engine.rb +9 -1
- data/lib/panda_pal/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5aaa770332536d17f0a40ca1501b4b1e7887d1ce06a77ceb36f379d6177fa841
|
4
|
+
data.tar.gz: 33645394c6afdc6e56a3cba902c615dc8bea904d327768193f533eff40e1ec4f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dd6acc35f33b92bb9bcb05390867c34680cd81fe02c985399ee97fa82988efe79694392024d40e8cecd4e873f606d810ed1ad9e30dad3654395355f8ec1f2a9e
|
7
|
+
data.tar.gz: 79fb4db2b78e89025737ff607a062351cec69f747c61169a93c1e5759aad19672f4c14148d49229b80eef07b1d11615c75127082946576b17f49d29a6479ef56
|
data/lib/panda_pal/engine.rb
CHANGED
@@ -66,9 +66,17 @@ module PandaPal
|
|
66
66
|
end
|
67
67
|
end
|
68
68
|
|
69
|
+
unless defined?(switch_org)
|
70
|
+
def switch_org(org, &block)
|
71
|
+
org = PandaPal::Organization.find_by(name: org) if org.is_a?(String)
|
72
|
+
org.switch_tenant(&block)
|
73
|
+
end
|
74
|
+
end
|
75
|
+
|
69
76
|
unless defined?(current_organization)
|
70
77
|
def current_organization
|
71
|
-
|
78
|
+
org_name = Apartment::Tenant.split_tenant(Apartment::Tenant.current)[1]
|
79
|
+
PandaPal::Organization.find_by_name(org_name)
|
72
80
|
end
|
73
81
|
end
|
74
82
|
end
|
data/lib/panda_pal/version.rb
CHANGED