arrangeable 0.1.0 → 0.1.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/README.md +3 -3
- data/arrangeable.gemspec +2 -2
- data/lib/arrangeable/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e792401eb5f3db0304d82e1e0c03e2caf46fb7f18c9e6edae78d60649e5bcfc8
|
|
4
|
+
data.tar.gz: 454d4350d6bb622903ec9f88bcabce041ae4e154c017d4e3d4fc2ab3c67e5bee
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: eadfdb9c398ac738ad8227de9348c9eb2f791a57ff2c191f5161deea4652f892d81e157a4cf5f3843ca49478e90ff28e0b1ad1c44c6a603d6a185da638efb653
|
|
7
|
+
data.tar.gz: 31669e132c9a3b1fe89c1d9007069bc530f1008cc6dba00004f1a4054753244a457eeeb7993b123735e496fe5f4ad851e4fe83d8c2d0da101cf2e3da4dd5f6c3
|
data/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Arrangeable
|
|
2
2
|
|
|
3
|
-
Arrangeable provides an organized and seamless way to sort your
|
|
3
|
+
Arrangeable provides an organized and seamless way to sort your ActiveRecord objects by different attributes.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
@@ -20,7 +20,7 @@ Or install it yourself as:
|
|
|
20
20
|
|
|
21
21
|
## Usage
|
|
22
22
|
|
|
23
|
-
Include Arrangeable inside ApplicationRecord or directly inside your model and override the `arrangeable_fields` method for each model to whitelist the fields you want to use for sorting:
|
|
23
|
+
Include Arrangeable inside ApplicationRecord or directly inside your ActiveRecord model and override the `arrangeable_fields` method for each model to whitelist the fields you want to use for sorting:
|
|
24
24
|
|
|
25
25
|
```ruby
|
|
26
26
|
class User < ApplicationRecord
|
|
@@ -38,7 +38,7 @@ end
|
|
|
38
38
|
|
|
39
39
|
Failing to override `arrangeable_fields` will raise a `NotImplementedError`.
|
|
40
40
|
|
|
41
|
-
Now sort your
|
|
41
|
+
Now sort your objects by calling `arrange` on a comma-separated order string. Prepend a negative sign `-` before a key to order by that key descendingly:
|
|
42
42
|
|
|
43
43
|
```ruby
|
|
44
44
|
|
data/arrangeable.gemspec
CHANGED
|
@@ -8,8 +8,8 @@ Gem::Specification.new do |spec|
|
|
|
8
8
|
spec.authors = ["Umar Al-Kfaween"]
|
|
9
9
|
spec.email = ["omar.ka923@gmail.com"]
|
|
10
10
|
|
|
11
|
-
spec.summary = %q{Arrangeable provides an organized and seamless way to sort your
|
|
12
|
-
spec.description = %q{Arrangeable provides an organized and seamless way to sort your
|
|
11
|
+
spec.summary = %q{Arrangeable provides an organized and seamless way to sort your ActiveRecord objects by different attributes. }
|
|
12
|
+
spec.description = %q{Arrangeable provides an organized and seamless way to sort your ActiveRecord objects by different attributes. }
|
|
13
13
|
spec.homepage = "https://github.com/umar221b/arrangeable"
|
|
14
14
|
spec.license = "MIT"
|
|
15
15
|
|
data/lib/arrangeable/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: arrangeable
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Umar Al-Kfaween
|
|
@@ -66,8 +66,8 @@ dependencies:
|
|
|
66
66
|
- - "~>"
|
|
67
67
|
- !ruby/object:Gem::Version
|
|
68
68
|
version: '3.0'
|
|
69
|
-
description: 'Arrangeable provides an organized and seamless way to sort your
|
|
70
|
-
objects by different attributes '
|
|
69
|
+
description: 'Arrangeable provides an organized and seamless way to sort your ActiveRecord
|
|
70
|
+
objects by different attributes. '
|
|
71
71
|
email:
|
|
72
72
|
- omar.ka923@gmail.com
|
|
73
73
|
executables: []
|
|
@@ -111,6 +111,6 @@ requirements: []
|
|
|
111
111
|
rubygems_version: 3.0.3
|
|
112
112
|
signing_key:
|
|
113
113
|
specification_version: 4
|
|
114
|
-
summary: Arrangeable provides an organized and seamless way to sort your
|
|
115
|
-
by different attributes
|
|
114
|
+
summary: Arrangeable provides an organized and seamless way to sort your ActiveRecord
|
|
115
|
+
objects by different attributes.
|
|
116
116
|
test_files: []
|