administrate_ransack 0.5.1 → 0.6.0
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/README.md +18 -0
- data/lib/administrate_ransack/version.rb +1 -1
- metadata +10 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 32afd347fc9d0dda302dca3c72f83a214a22f49394fbf987f45800ab1d549a90
|
4
|
+
data.tar.gz: 7c355e92c9b79610fa9bc8323e0f8231deb22b05ce1204446f5a72a61ff21749
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1e374f0de682af5cfbdfaf26274768016bfa4446d64e1ca47052a20339d81baa0cc62dc0b08542af0e52c0a0ef1987b080ee015e2ed09ad5d09fecb6815a4671
|
7
|
+
data.tar.gz: b42a18d64406cbf2e91594c5f7f740508cdc0fb3ed641e0216c551f2a7d2b1467154613dfc9be744faa8863e529b61194ccffe9b28794c5cac6acb07878d44b4
|
data/README.md
CHANGED
@@ -27,6 +27,24 @@ prepend AdministrateRansack::Searchable
|
|
27
27
|
<%= render('administrate_ransack/filters') %>
|
28
28
|
```
|
29
29
|
|
30
|
+
- Update your model (ex. Post) exposing the ransackable attributes and associations, skipping this step will raise an exception that explains in details:
|
31
|
+
|
32
|
+
```rb
|
33
|
+
class Post < ApplicationRecord
|
34
|
+
# ...
|
35
|
+
|
36
|
+
class << self
|
37
|
+
def ransackable_attributes(_auth_object = nil)
|
38
|
+
%w[title description]
|
39
|
+
end
|
40
|
+
|
41
|
+
def ransackable_associations(_auth_object = nil)
|
42
|
+
%w[author]
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
```
|
47
|
+
|
30
48
|
- See the Usage section for extra options
|
31
49
|
|
32
50
|
## Usage
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: administrate_ransack
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mattia Roccoberton
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-07-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: administrate
|
@@ -28,16 +28,22 @@ dependencies:
|
|
28
28
|
name: ransack
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '2.3'
|
34
|
+
- - "<"
|
35
|
+
- !ruby/object:Gem::Version
|
36
|
+
version: '5'
|
34
37
|
type: :runtime
|
35
38
|
prerelease: false
|
36
39
|
version_requirements: !ruby/object:Gem::Requirement
|
37
40
|
requirements:
|
38
|
-
- - "
|
41
|
+
- - ">="
|
39
42
|
- !ruby/object:Gem::Version
|
40
43
|
version: '2.3'
|
44
|
+
- - "<"
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '5'
|
41
47
|
description: A plugin for Administrate to use Ransack for search filters
|
42
48
|
email:
|
43
49
|
- mat@blocknot.es
|