tramway-api 1.8.3.1 → 1.8.4

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: 6ea920d1d95b5d0879e4761b50d32a53ae9cd09425fd7ce6f3c35cc6173821cf
4
- data.tar.gz: 248fc9efe23a6b44db5ce5065fc4e15500c3c387f5c39380b83e677cb750434c
3
+ metadata.gz: 1c007eb42b91d7a7b138884b5ce40739a7f90b63254c223c6a82a16b652e9e47
4
+ data.tar.gz: 5634bf604e6984e540fdfa1bcab1b4a93aca5e0a3e140756711b6e1f3c993f25
5
5
  SHA512:
6
- metadata.gz: 949028808784d424710d0a72e602eefe85144ef46ffd1cba3a1671ad787fb91c527ae2b52002a5c60ada7c4225c9b853c3ee0f944ccda9ac7d224d086d029402
7
- data.tar.gz: 5ca4783d217ee96ab1aef6be3368dd1a8c0a71233a5b129b30147b34d77f74b868933986bddcb0a12229fc4f9d6454332c7a7a1351f4c883b2be8269223c0023
6
+ metadata.gz: 9af7275766df2240504ae8c258ccc0f0e278855890ccf2fdb03ab735f90aa9252dd2ab462f1adb8e8ede509b3ec0e508b1c2db746932e34196c2fdc67253639c
7
+ data.tar.gz: ebe525f69af40b34e0f8f12bf70205dcc7d1072462eda9ffadf04858137faeec96b42556e71e30f66724011245f595021deb3a5240a223e734012a5da8e6feb0
@@ -29,7 +29,8 @@ module Tramway
29
29
  end
30
30
 
31
31
  def records
32
- collection = model_class.active.order(id: :desc).send params[:scope] || :all
32
+ active_records = model_class.respond_to?(:active) ? model_class.active : model_class.all
33
+ collection = active_records.order(id: :desc).send params[:scope] || :all
33
34
  collection = collection.full_text_search params[:search] if params[:search]
34
35
  collection
35
36
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Tramway
4
4
  module Api
5
- VERSION = '1.8.3.1'
5
+ VERSION = '1.8.4'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tramway-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.3.1
4
+ version: 1.8.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pavel Kalashnikov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-07-19 00:00:00.000000000 Z
11
+ date: 2020-07-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: active_model_serializers