forest_liana 2.3.2 → 2.3.3
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: '046176008e331d0d0ef0f719a898e070a834b667'
|
4
|
+
data.tar.gz: 228a5457c46e11389e6fb87cee5d811df508b2a2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 71402998da21e786c5dd6d8a70b8f025cd92335ba266fb459c809e003ad55d99636457ef99eeaa03bcf2f567e918ea474209a3d67cba441319f774e216715c64
|
7
|
+
data.tar.gz: 730998341e1be2728267a5cfc91d160205ed0aff5958d98fa374b84c0a0e227f2cbc6515eea3dd4a6417f0da661e42c519e554675bfe801ce1dcd135d8013208
|
@@ -17,6 +17,7 @@ module ForestLiana
|
|
17
17
|
extract_carrierwave
|
18
18
|
extract_acts_as_taggable
|
19
19
|
extract_smart_fields_values
|
20
|
+
extract_devise
|
20
21
|
|
21
22
|
@attributes
|
22
23
|
end
|
@@ -137,6 +138,17 @@ module ForestLiana
|
|
137
138
|
end
|
138
139
|
end
|
139
140
|
|
141
|
+
def extract_devise
|
142
|
+
return if @params['data']['attributes'].blank?
|
143
|
+
return unless has_devise?
|
144
|
+
|
145
|
+
if @params['data']['attributes']['password'] == '**********'
|
146
|
+
@params['data']['attributes'].delete('password')
|
147
|
+
else
|
148
|
+
@attributes['password'] = @params['data']['attributes']['password']
|
149
|
+
end
|
150
|
+
end
|
151
|
+
|
140
152
|
def paperclip_handler?(attr)
|
141
153
|
begin
|
142
154
|
Paperclip.io_adapters.handler_for(attr)
|
@@ -177,5 +189,9 @@ module ForestLiana
|
|
177
189
|
@resource.respond_to?(:acts_as_taggable) &&
|
178
190
|
@resource.acts_as_taggable.respond_to?(:to_a)
|
179
191
|
end
|
192
|
+
|
193
|
+
def has_devise?
|
194
|
+
@resource.respond_to?(:devise_modules?)
|
195
|
+
end
|
180
196
|
end
|
181
197
|
end
|
@@ -203,6 +203,13 @@ module ForestLiana
|
|
203
203
|
end
|
204
204
|
end
|
205
205
|
|
206
|
+
# NOTICE: Format Devise attributes
|
207
|
+
if active_record_class.respond_to?(:devise_modules?)
|
208
|
+
serializer.attribute('password') do |x|
|
209
|
+
'**********'
|
210
|
+
end
|
211
|
+
end
|
212
|
+
|
206
213
|
SchemaUtils.associations(active_record_class).each do |a|
|
207
214
|
begin
|
208
215
|
if SchemaUtils.model_included?(a.klass)
|
@@ -37,8 +37,10 @@ module ForestLiana
|
|
37
37
|
}]
|
38
38
|
})
|
39
39
|
|
40
|
-
collection.fields.
|
41
|
-
['encrypted_password'
|
40
|
+
collection.fields.each do |field|
|
41
|
+
if field[:field] == 'encrypted_password'
|
42
|
+
field[:field] = 'password'
|
43
|
+
end
|
42
44
|
end
|
43
45
|
end
|
44
46
|
|
data/lib/forest_liana/version.rb
CHANGED