fastapi 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/fastapi.rb +4 -3
- 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: 328f3a1e05457ead48ba2c6d01c09bfd7dcdfeb0
|
4
|
+
data.tar.gz: 40861b7243fede0344304840c81344e3c1a06db4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 18773bd2adf7042592c600e7a00c4c0af2514d39796f20dfe195f6eb789396ed40facbf52e46b63fcebf81b7775b648773e7f0da82c9acdce2207f0e2587df9e
|
7
|
+
data.tar.gz: 7d21483a9259b0d76c78aac7d40afb0d499b4924855255b622fdd4998a20d306281956f72fa093eb57ac6beae9da76fc8a52342c23088e88a77643db4216d0ae
|
data/lib/fastapi.rb
CHANGED
@@ -680,7 +680,7 @@ class FastAPI
|
|
680
680
|
end
|
681
681
|
end
|
682
682
|
|
683
|
-
self_string = @model.to_s.
|
683
|
+
self_string = @model.to_s.tableize.singularize
|
684
684
|
self_string_table = @model.to_s.tableize
|
685
685
|
|
686
686
|
field_list = []
|
@@ -737,7 +737,7 @@ class FastAPI
|
|
737
737
|
# Many fields (Many to 1)
|
738
738
|
has_many.each do |model|
|
739
739
|
|
740
|
-
model_string = model.to_s.
|
740
|
+
model_string = model.to_s.tableize.singularize
|
741
741
|
model_string_table = model.to_s.tableize
|
742
742
|
model_symbol = model_string_table.to_sym
|
743
743
|
|
@@ -772,7 +772,8 @@ class FastAPI
|
|
772
772
|
'as',
|
773
773
|
'__' + model_string_table,
|
774
774
|
'WHERE',
|
775
|
-
'__' + model_string_table + '.' + self_string + '_id',
|
775
|
+
'__' + model_string_table + '.' + self_string + '_id IS NOT NULL',
|
776
|
+
'AND __' + model_string_table + '.' + self_string + '_id',
|
776
777
|
'=',
|
777
778
|
self_string_table + '.id',
|
778
779
|
has_many_filters,
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastapi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Keith Horwood
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-07-
|
11
|
+
date: 2014-07-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: oj
|