Skip to content

Commit

Permalink
Remove old deprecation exceptions from Model.property
Browse files Browse the repository at this point in the history
Those "ifs" were older than me
  • Loading branch information
solnic committed Nov 17, 2011
1 parent a4c7caf commit f57235a
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions lib/dm-core/model/property.rb
Expand Up @@ -40,15 +40,11 @@ def inherited(model)
#
# @api public
def property(name, type, options = {})
if TrueClass == type
raise "#{type} is deprecated, use Boolean instead at #{caller[2]}"
elsif BigDecimal == type
raise "#{type} is deprecated, use Decimal instead at #{caller[2]}"
end

# if the type can be found within Property then
# use that class rather than the primitive
unless klass = DataMapper::Property.determine_class(type)
klass = DataMapper::Property.determine_class(type)

unless klass
raise ArgumentError, "+type+ was #{type.inspect}, which is not a supported type"
end

Expand Down

0 comments on commit f57235a

Please sign in to comment.