Fix bug: users can now be saved
This commit is contained in:
1 parent
0a6efeb0a2
commit
d9d7099da6
7 files changed
+26
-18
No files matched your search
@@ -0,0 +1,12 @@
|
||||
module Panel::UserHelper
|
||||
|
||||
def show_user_attribute(object, key, locale = '')
|
||||
attribute = object.attribute_values.detect {|av| av.key.to_s.eql?(key.to_s) || av[locale.to_s].eql?(locale.to_s) }
|
||||
if locale.to_s.blank?
|
||||
attribute['key']
|
||||
else
|
||||
attribute[locale.to_s]
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
Reference in new issue
Block a user