mini_record 0.4.5 → 0.4.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/mini_record/auto_schema.rb +7 -1
- data/lib/mini_record/version.rb +1 -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: 24a1cc995d7a4bc966d6aa5408ddccf9e69df115
|
4
|
+
data.tar.gz: c6506a687118394b8302ae7791b61e775e3915bf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 837c811faa4db44c8b8882075b9b0e080d765ee5666cb5075510358e6a71ed43a2431f833e8f04fa4dc60c0b7424ad81a6b727b1f6b9b4d7c1ec57d26e89fa15
|
7
|
+
data.tar.gz: 52747b51587991a9ffb2ee1ea3e50d66309c549536e1285d46d24b50dc1da478b3b47fd9c76c606d1cf47c166f3f05383bfae2d454c2d9c9693696f13c4c8b55
|
@@ -114,7 +114,8 @@ module MiniRecord
|
|
114
114
|
# t.column :type, "ENUM('EMPLOYEE','CLIENT','SUPERUSER','DEVELOPER')"
|
115
115
|
if type.is_a?(String)
|
116
116
|
# will be converted in: t.column :type, "ENUM('EMPLOYEE','CLIENT')"
|
117
|
-
|
117
|
+
options.reverse_merge!(:limit => 0) unless postgresql_range?(type)
|
118
|
+
table_definition.column(column_name, type, options)
|
118
119
|
else
|
119
120
|
# wil be converted in: t.string :name
|
120
121
|
table_definition.send(type, column_name, options)
|
@@ -138,6 +139,11 @@ module MiniRecord
|
|
138
139
|
alias :property :field
|
139
140
|
alias :col :field
|
140
141
|
|
142
|
+
def postgresql_range? type
|
143
|
+
return unless connection.is_a?(ActiveRecord::ConnectionAdapters::PostgreSQLAdapter)
|
144
|
+
type =~ /range/
|
145
|
+
end
|
146
|
+
|
141
147
|
def timestamps
|
142
148
|
field :created_at, :updated_at, :as => :datetime
|
143
149
|
end
|
data/lib/mini_record/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mini_record
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Davide D'Agostino
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-05-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|