Skip to content
This repository has been archived by the owner on Apr 17, 2018. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
Make sure inferred Boolean FKs use the Boolean type and not TrueClass
  • Loading branch information
dkubb committed Sep 9, 2009
1 parent 16672bd commit 47b1653
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/dm-core/associations/many_to_one.rb
Expand Up @@ -48,7 +48,8 @@ def child_key
properties[property_name] || begin
# create the property within the correct repository
DataMapper.repository(repository_name) do
child_model.property(property_name, parent_property.primitive, child_key_options(parent_property))
type = parent_property.send(parent_property.type == DataMapper::Types::Boolean ? :type : :primitive)
child_model.property(property_name, type, child_key_options(parent_property))
end
end
end
Expand Down

0 comments on commit 47b1653

Please sign in to comment.