depository 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/depository/collection.rb +4 -0
- data/lib/depository/database.rb +4 -0
- data/lib/depository/serialize.rb +2 -4
- metadata +1 -1
data/lib/depository/database.rb
CHANGED
data/lib/depository/serialize.rb
CHANGED
@@ -40,10 +40,8 @@ module Depository
|
|
40
40
|
attrs = attrs.dup
|
41
41
|
|
42
42
|
Depository::Database.db.schema(config.db).reject { |column, opts|
|
43
|
-
attrs[column].nil?
|
44
|
-
}.each
|
45
|
-
attrs[column] = attrs[column].to_i if opts[:type] == :integer
|
46
|
-
end
|
43
|
+
attrs[column].nil? || opts[:type] != :integer
|
44
|
+
}.each { |column, opts| attrs[column] = attrs[column].to_i }
|
47
45
|
|
48
46
|
attrs
|
49
47
|
end
|