lib/selectable_attr/base.rb in akm-selectable_attr-0.3.1 vs lib/selectable_attr/base.rb in akm-selectable_attr-0.3.3
- old
+ new
@@ -124,10 +124,11 @@
self.connection unless self.connected?
rescue Exception
return nil if !self.connected?
end
end
- (self.columns || []).any?{|col|col.name.to_s == attr.to_s}
+ self.table_exist? ?
+ (self.columns || []).any?{|col|col.name.to_s == attr.to_s} : false
end
def attr_enumeable_base(*args, &block)
@base_name_processor = block
end