jsonapi_compliable 0.3.5 → 0.3.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c0e9bc14ee283f01edb3d645f2d06f15c63964b1
4
- data.tar.gz: 2aa0f79d71daf3a3e29a2af76309a4b81c0ffc21
3
+ metadata.gz: f5eba80fc1722767efd41e1b5ed7b0d51e3ef5a6
4
+ data.tar.gz: 9647d246fbdf1b78bd057c4dd90824f0f926e7da
5
5
  SHA512:
6
- metadata.gz: bdd62b729def2042d05df80e50068ead32567170c3c3fcefa500b6fdbefa73af9c0aacdae27b21ff49916210300109b0d293cfeeb2da54e4d831c8a987b83508
7
- data.tar.gz: 0d4f1e1d7f43a1fef11c7c4b47c56cdd9bc42dd0f1a5359186c1d03b368fc2eddd6dcdb16793445fde8b4b182efbe048d62f5a5a824789b3e7844fa17234ea80
6
+ metadata.gz: 5b9c65e472fedcaf19e6daa03277d65818098483060fd211dbf720964ca6fff2d3847b2e16592ebdf3d5dfc8296909f92c7d64cdf70c6ff6304ca2a85596ee4d
7
+ data.tar.gz: c684d8d222243a05ebef45a157086e7d2eef00bb3ebe82caaf66bfcd545e81eec20a0cd31f0810044b046f444c7c0bdd8ca309177e278bed839ce858b7ca34ab
@@ -21,6 +21,10 @@ module JsonapiCompliable
21
21
  20
22
22
  end
23
23
 
24
+ def default_sort
25
+ 'id'
26
+ end
27
+
24
28
  def jsonapi_scope(scope,
25
29
  filter: true,
26
30
  includes: true,
@@ -15,7 +15,7 @@ module JsonapiCompliable
15
15
  private
16
16
 
17
17
  def sort_param
18
- @sort_param ||= (params[:sort] || 'id')
18
+ @sort_param ||= (params[:sort] || @controller.default_sort)
19
19
  end
20
20
 
21
21
  def direction
@@ -1,3 +1,3 @@
1
1
  module JsonapiCompliable
2
- VERSION = "0.3.5"
2
+ VERSION = "0.3.6"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jsonapi_compliable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.5
4
+ version: 0.3.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lee Richmond
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2016-09-24 00:00:00.000000000 Z
12
+ date: 2016-11-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -257,4 +257,3 @@ signing_key:
257
257
  specification_version: 4
258
258
  summary: Easily build jsonapi.org-compatible APIs
259
259
  test_files: []
260
- has_rdoc: