Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #17 from sdalu/master

Fixed encoding of ldap data
  • Loading branch information...
commit 28a2727f7d53e48bb75f851bb1c6cad5f54990ae 2 parents 34368af + 72ff3b0
@mkristian authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/adapters/ldap_adapter.rb
View
4 lib/adapters/ldap_adapter.rb
@@ -209,8 +209,10 @@ def create_resource(resource)
value = prop.get!(resource)
if prop.class == ::Ldap::LdapArray
props[prop.field.to_sym] = value unless value.nil? or value.size == 0
+ elsif ::DataMapper::Property::Boolean === prop
+ props[prop.field.to_sym] = value ? 'TRUE' : 'FALSE' unless value.nil?
else
- props[prop.field.to_sym] = value.to_s unless value.nil?
+ props[prop.field.to_sym] = prop.dump(value).to_s unless value.nil?
end
key = prop if prop.serial?
end
Please sign in to comment.
Something went wrong with that request. Please try again.