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 +4 -4
- data/lib/scopie_rails/controller.rb +9 -2
- data/lib/scopie_rails/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e79ca18741231bd6ae48f35ca5bb906962c63915
|
|
4
|
+
data.tar.gz: 93f0f978fcdf8a524a38912e468cb96c2dc6f800
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
|
6
|
-
|
|
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
|
|
data/lib/scopie_rails/version.rb
CHANGED