Ignore unrecognized columns #899

Merged
merged 1 commit into from Jan 2, 2012
@@ -119,7 +119,7 @@ def polymorphic_associations
end
def properties
- columns = model.columns.reject {|c| DISABLED_COLUMN_TYPES.include?(c.type.to_sym) }
+ columns = model.columns.reject {|c| c.type.blank? || DISABLED_COLUMN_TYPES.include?(c.type.to_sym) }
columns.map do |property|
{
:name => property.name.to_sym,
@@ -296,7 +296,7 @@ def association_foreign_type_lookup(association)
association.options[:foreign_type].try(:to_sym) || :"#{association.name}_type"
end
end
-
+
def association_nested_attributes_options_lookup(association)
model.nested_attributes_options.try { |o| o[association.name.to_sym] }
end