hola_milind_patel 0.1.20 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/config/hola_milind_patel.rb +1 -1
- data/lib/hola_milind_patel.rb +13 -11
- 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: 9ae933213d39ff932f87a50c550127ba8f6942e483c13941e8053e11121b728e
|
4
|
+
data.tar.gz: 0f3350a004e42e0504a6d783c515f31f7331e23d1b3933d3d9ee1d5850e183e4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7de4d7db02ff1c7242453ada8c366a26129a9dd907c02903b628e5143f1eafa364bfc874583c4002990ae718522b2b592b5207a90d648cfeddbc183fd1f98082
|
7
|
+
data.tar.gz: 8f512cc3145642d8b9a13383b1b438d33270237e9995f49a3320fe6b9fe8ff13192a8b7c060e38c4a151899c943cfdb5e13571c93e3cd0ce32dcbbaebe4d156c
|
data/lib/hola_milind_patel.rb
CHANGED
@@ -1,22 +1,25 @@
|
|
1
1
|
require 'mobility'
|
2
2
|
require 'config/hola_milind_patel'
|
3
3
|
module HolaMilindPatel
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
responce = HolaMilindPatel.getShowData(data) #if data[0].nil?
|
4
|
+
def self.included(klass)
|
5
|
+
klass.after_find :translate_data
|
6
|
+
end
|
8
7
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
8
|
+
|
9
|
+
def translate_data
|
10
|
+
result = HolaMilindPatel.translate(self)
|
11
|
+
self.attributes.each do |key,value|
|
12
|
+
if (self.send("#{key}_backend") rescue "false") != "false"
|
13
13
|
data.send(key+'=', responce[key])
|
14
14
|
end
|
15
15
|
end
|
16
|
-
return data
|
17
16
|
end
|
18
17
|
|
19
|
-
|
18
|
+
def self.translate(data)
|
19
|
+
#responce = getData(data) if !data[0].nil?
|
20
|
+
responce = getShowData(data) if data[0].nil?
|
21
|
+
return responce
|
22
|
+
end
|
20
23
|
|
21
24
|
# def self.getData(data)
|
22
25
|
# if RequestStore.store[:selected_language] == "all"
|
@@ -95,5 +98,4 @@ module HolaMilindPatel
|
|
95
98
|
RequestStore.store[:selected_language] = language
|
96
99
|
HolaMilindPatel.locale = language == "all" ? I18n.default_locale : language
|
97
100
|
end
|
98
|
-
|
99
101
|
end
|