lib/pg_serializable/nodes/attribute.rb in pg_serializable-1.0.1 vs lib/pg_serializable/nodes/attribute.rb in pg_serializable-1.1.0
- old
+ new
@@ -7,8 +7,12 @@
@klass = klass
@column_name = column_name
@label = label || column_name
@prc = prc if block_given?
end
+
+ def enum?
+ @enum ||= klass.defined_enums.has_key? column_name.to_s
+ end
end
end
end