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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cfe8817a1796e39ffa45d7ca78ea92fb476b8b114e59f058bf94509996fd72c7
4
- data.tar.gz: b321a790c6cb02112b90cb458e498705ed66227506fc76ae8790a04fdb603e54
3
+ metadata.gz: 0b50a745e0fcfc8d58634db7b58d956b5224c65f006da7adc0f1cff96f1ee558
4
+ data.tar.gz: 49310d9172f4fe6898fae709d7c674ec170593e99f22dcf6247bd101b61aab46
5
5
  SHA512:
6
- metadata.gz: 1e418da7f6940422f315202f10bc603a138144787b5e97168a6e40b85719e624d2e862fb460dc4eb754e8890ee55ec53ad2e66a75cc27b1427252f1c8e8fd502
7
- data.tar.gz: c6acc4f51df8f314fd2bb650e54160c0c4b549059a16964f8814d103abbd4f0eae1f666f02a59564f9efaf7e960f7e08c21874769bdf0f33ccb86973788f2cff
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
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Jsonapi
4
4
  module QueryBuilder
5
- VERSION = "0.1.4.pre"
5
+ VERSION = "0.1.5.pre"
6
6
  end
7
7
  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.pre
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-18 00:00:00.000000000 Z
11
+ date: 2020-08-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord