scopie_rails 0.4.0 → 0.4.1

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: c34fb74189d43684b3e608fc38ced2a8aa3f1646
4
- data.tar.gz: 857a9c86d98119e449a7a6991dab6f46c4663c63
3
+ metadata.gz: e79ca18741231bd6ae48f35ca5bb906962c63915
4
+ data.tar.gz: 93f0f978fcdf8a524a38912e468cb96c2dc6f800
5
5
  SHA512:
6
- metadata.gz: 8976afa949ae119339df01d806c509cdf097c643c4fcee414ad76397db3bba33e9d31f67336a4f657f401f133ae71069ebc5d0eccc94c10b46ad0d5955566f0d
7
- data.tar.gz: c4367389c842a91331d63dbe1e361847069d766987f71cd0102b7cc20e4dfe33ea25425896fd74627f258192f873e5dd372706f999141bdf128a2648522a40ad
6
+ metadata.gz: a30787da712ac4245dba3a1739a31713f81961419eaf37f1ce076e3e6575457e944dba56cc6ba6085e9a6e81e6a826bb326e9f50f74fa16e334001819b6a566c
7
+ data.tar.gz: 5637832e34c7376ec59f102321bde65510b38ed1e16cbb765c6c1e2968e59a213f6f546461c4df5fa3141ed7e99dd70b65140ad4e65567751a2749f5b8350742
@@ -2,11 +2,18 @@
2
2
  module ScopieRails::Controller
3
3
  extend ActiveSupport::Concern
4
4
 
5
- def apply_scopes(target, scopie: nil, hash: params)
6
- scopie ||= find_scopie_class.new(self)
5
+ def default_scopie
6
+ @default_scopie ||= find_scopie_class.new(self)
7
+ end
8
+
9
+ def apply_scopes(target, scopie: default_scopie, hash: params)
7
10
  Scopie.apply_scopes(target, hash, method: hash[:action], scopie: scopie)
8
11
  end
9
12
 
13
+ def current_scopes(scopie: default_scopie, hash: params)
14
+ Scopie.current_scopes(hash, method: hash[:action], scopie: scopie)
15
+ end
16
+
10
17
  included do
11
18
  class_attribute :scopie_class
12
19
 
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module ScopieRails
3
- VERSION = '0.4.0'
3
+ VERSION = '0.4.1'
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scopie_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yury Kotov