jsonapi-query_builder 0.1.4.pre → 0.1.5.pre
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/jsonapi/query_builder/base_query.rb +12 -0
- data/lib/jsonapi/query_builder/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0b50a745e0fcfc8d58634db7b58d956b5224c65f006da7adc0f1cff96f1ee558
|
4
|
+
data.tar.gz: 49310d9172f4fe6898fae709d7c674ec170593e99f22dcf6247bd101b61aab46
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2cb51151e0dfa54c039c6f3ebe6dea0ef6bb1564188ba9b95fab667cb433a3ee390c834d28fc14b4f283fafa79bbfb493fcb30d81e927a072edd25cc2a249b70
|
7
|
+
data.tar.gz: 829f1696107d7241c850ec6b88f03a6e08ca4bb5b21ca535901afed283da1a13bfb2be44d94372b2aaf5603d21a79fa37af8aac1e19206f95db33496b8075abd
|
@@ -27,6 +27,18 @@ module Jsonapi
|
|
27
27
|
.yield_self(&method(:filter))
|
28
28
|
.yield_self(&method(:paginate))
|
29
29
|
end
|
30
|
+
|
31
|
+
def find(id)
|
32
|
+
find_by id: id
|
33
|
+
end
|
34
|
+
|
35
|
+
def record
|
36
|
+
find_by id: params[:id]
|
37
|
+
end
|
38
|
+
|
39
|
+
def find_by(**kwargs)
|
40
|
+
add_includes(collection).find_by(kwargs)
|
41
|
+
end
|
30
42
|
end
|
31
43
|
end
|
32
44
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jsonapi-query_builder
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5.pre
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jure Cindro
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-08-
|
11
|
+
date: 2020-08-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|