rare_map 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/rare_map/schema_parser.rb +2 -1
- data/lib/rare_map/version.rb +1 -1
- metadata +2 -2
@@ -42,10 +42,11 @@ module RareMap
|
|
42
42
|
end
|
43
43
|
|
44
44
|
def primary_key
|
45
|
+
return @primary_key if @primary_key
|
45
46
|
return 'id' if @id
|
46
47
|
|
47
48
|
candidates = @columns.find_all { |col| col.unique }.map { |col| col.name }
|
48
|
-
return @primary_key if candidates.include? @primary_key
|
49
|
+
# return @primary_key if candidates.include? @primary_key
|
49
50
|
return 'id' if candidates.include? 'id'
|
50
51
|
candidates.find { |c| c =~ eval("/^#{@name}.*id$/") } ||
|
51
52
|
candidates.find { |c| c =~ eval("/^#{singularize}.*id$/") } ||
|
data/lib/rare_map/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rare_map
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -142,7 +142,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
142
142
|
version: '0'
|
143
143
|
segments:
|
144
144
|
- 0
|
145
|
-
hash:
|
145
|
+
hash: 1396508381234435921
|
146
146
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
147
147
|
none: false
|
148
148
|
requirements:
|