padma-assets 0.2.7 → 0.2.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/abilities/general_ability.rb +9 -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: c6c0e4404edbb4641adb4be29c775a4510002c70
|
4
|
+
data.tar.gz: c7b33edbea9a3a408280f2a099600595c194fe2c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 958cbbe5c7e1a584bce3a16877ae789f978cfb33d1ea74ea995fabf702d204341f7ead231a9e91c9b139e22ccb2d1281c3e6e1cb49e9d480c088fd6ee9f61954
|
7
|
+
data.tar.gz: 63d3768c45fc19e99b1645de605e7cf36e6428dcf71ff7396bee2e09c6f6b8b4e8048f4ea93117845e5c1d36ee3b2ff0099c226983dfcac7763c896041311066
|
@@ -21,11 +21,19 @@ class GeneralAbility
|
|
21
21
|
name = user.current_account.try(:name)
|
22
22
|
if name
|
23
23
|
@country = Rails.cache.fetch("countryfor#{name}") do
|
24
|
-
user.
|
24
|
+
padma_account(user).try(:country)
|
25
25
|
end
|
26
26
|
@country == country_name
|
27
27
|
end
|
28
28
|
end
|
29
|
+
|
30
|
+
def padma_account(user)
|
31
|
+
if user.current_account.is_a?(PadmaAccount)
|
32
|
+
user.current_account
|
33
|
+
else
|
34
|
+
user.current_account.padma
|
35
|
+
end
|
36
|
+
end
|
29
37
|
|
30
38
|
def alpha?(user)
|
31
39
|
user.account_tester_level == 'alpha'
|