From f0139a16c263ba62e7e45d462a4fff411ebf2523 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Tue, 16 Nov 2010 08:09:26 -0800 Subject: returning undefined for unknown column types --- lib/arel/attributes.rb | 2 +- lib/arel/attributes/attribute.rb | 13 +++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) (limited to 'lib/arel') diff --git a/lib/arel/attributes.rb b/lib/arel/attributes.rb index a7fb00293b..92cc041f83 100644 --- a/lib/arel/attributes.rb +++ b/lib/arel/attributes.rb @@ -13,7 +13,7 @@ module Arel when :date, :datetime, :timestamp, :time then Time when :boolean then Boolean else - raise NotImplementedError, "Column type `#{column.type}` is not currently handled" + Undefined end end end diff --git a/lib/arel/attributes/attribute.rb b/lib/arel/attributes/attribute.rb index e027a65a74..5cbe194b41 100644 --- a/lib/arel/attributes/attribute.rb +++ b/lib/arel/attributes/attribute.rb @@ -5,12 +5,13 @@ module Arel include Arel::Predications end - class String < Attribute; end - class Time < Attribute; end - class Boolean < Attribute; end - class Decimal < Attribute; end - class Float < Attribute; end - class Integer < Attribute; end + class String < Attribute; end + class Time < Attribute; end + class Boolean < Attribute; end + class Decimal < Attribute; end + class Float < Attribute; end + class Integer < Attribute; end + class Undefined < Attribute; end end Attribute = Attributes::Attribute -- cgit v1.2.3