mass_record 0.0.4.7 → 0.0.4.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mass_record/version.rb +1 -1
- data/lib/mass_record.rb +2 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d288ae09db2b38e806ee05081c53fb2b8d055a1d
|
4
|
+
data.tar.gz: 022bbc03b711b6472e733de81171d8aa2320af2b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 01e00ca7cdf2831542a11ca52f0414476a97e8b87497c174f293aa29fc9b6396bbc029b86501961fd9d7a454f429a81ebcb1cae1dac2353d4ca51302bf66f7ff
|
7
|
+
data.tar.gz: da82973a1cb9c68b31e906e13cb18bbdbf1e1a49c4ef542bda5d6ff0f20d245ac4abc2f381da42a3e17ccd7622f1d26d33f050f496f9e9ae207662647cc95733
|
data/lib/mass_record/version.rb
CHANGED
data/lib/mass_record.rb
CHANGED
@@ -714,10 +714,11 @@ module MassRecord
|
|
714
714
|
json_object.each do |k,v|
|
715
715
|
v = Time.parse v if v.is_a? String and [:datetime, :date, :time, :timestamp].include? model.column_types[k].type.to_sym.downcase # fix funky to_json format if present
|
716
716
|
v = time if crud_times.include? k and (v.blank? or k == updated_at) and model.column_names.include? k # add crud time if it is blank and it is a column in the model or if it is update_at just add the time
|
717
|
-
|
718
717
|
# convert to correct database type
|
719
718
|
begin
|
720
719
|
v = model.connection.type_cast v, model.column_types[k]
|
720
|
+
# handles a bug in the activerecord-sqlserver-adapter gem version 4.1
|
721
|
+
v = (v=='f' ? 0 : 1) if model.column_types[k].sql_type == 'bit' and ['f','t'].include?(v.to_s.downcase)
|
721
722
|
v = model.connection.quote_string v if v.is_a? String
|
722
723
|
rescue Exception => e # If it is a text field, automatically yamlize it if there is a non text type passed in (just like normal active record saves)
|
723
724
|
v = model.connection.type_cast v.to_yaml, model.column_types[k] if e.is_a? TypeError and model.column_types[k].type == :text
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mass_record
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.4.
|
4
|
+
version: 0.0.4.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nathan Hanna
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-01-
|
11
|
+
date: 2015-01-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|