Integration of Ray' modifications
This commit is contained in:
1 parent
c4810274ec
commit
861237d65b
39 files changed
+804
-175
No files matched your search
@@ -0,0 +1,16 @@
|
||||
module Admin::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) } rescue nil
|
||||
if attribute
|
||||
if locale.to_s.blank?
|
||||
attribute['key']
|
||||
else
|
||||
attribute[locale.to_s]
|
||||
end
|
||||
else
|
||||
''
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
Reference in new issue
Block a user