Permalink
Browse files

fixed boolean for ldap, correctly dump properties

  • Loading branch information...
1 parent 34368af commit 72ff3b0c9954dc3aacfc32dfee278885dc307a9b @sdalu sdalu committed Apr 5, 2013
Showing with 3 additions and 1 deletion.
  1. +3 −1 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

0 comments on commit 72ff3b0

Please sign in to comment.