Skip to content

Commit

Permalink
Merge pull request #17 from sdalu/master
Browse files Browse the repository at this point in the history
Fixed encoding of ldap data
  • Loading branch information
mkristian committed Apr 5, 2013
2 parents 34368af + 72ff3b0 commit 28a2727
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/adapters/ldap_adapter.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -209,8 +209,10 @@ def create_resource(resource)
value = prop.get!(resource) value = prop.get!(resource)
if prop.class == ::Ldap::LdapArray if prop.class == ::Ldap::LdapArray
props[prop.field.to_sym] = value unless value.nil? or value.size == 0 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 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 end
key = prop if prop.serial? key = prop if prop.serial?
end end
Expand Down

0 comments on commit 28a2727

Please sign in to comment.