crudle 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/crudle/version.rb +1 -1
- data/lib/crudle.rb +6 -6
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d4df21071ae1becaf1b7a48339adb2b5aaab2172
|
4
|
+
data.tar.gz: e1cc117d3649a74f3ab452427f82cb865147c56c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8bc48b43220475a92eff97e949102cb922b8ee2161ebac497d8ad068bf3eb60f8758d71b06146b904910896a2c3be7699dd2251af43c34a86f2892383a066ef3
|
7
|
+
data.tar.gz: 1c558b3d80b0e6dbcda0c9ada7e636f2e77d61baaa5314d0ee77af9ef100a14f0ad3460461213ceaba3350a78a62e63da060fe7455d76b5ad0c4768f360ae6c7
|
data/lib/crudle/version.rb
CHANGED
data/lib/crudle.rb
CHANGED
@@ -7,7 +7,7 @@ module Crudle
|
|
7
7
|
def self.included base
|
8
8
|
base.class_exec do
|
9
9
|
|
10
|
-
def
|
10
|
+
def configs params
|
11
11
|
{}
|
12
12
|
end
|
13
13
|
|
@@ -16,7 +16,7 @@ module Crudle
|
|
16
16
|
dataset = filtered_dataset(params)
|
17
17
|
offset, pager = pager(params, dataset.count, items_per_page, side_pages)
|
18
18
|
{
|
19
|
-
items: fetch_items(dataset, offset, params[:id]).map {|i|
|
19
|
+
items: fetch_items(dataset, offset, params[:id]).map {|i| list_serializer(i)},
|
20
20
|
pager: pager
|
21
21
|
}
|
22
22
|
end
|
@@ -46,15 +46,15 @@ module Crudle
|
|
46
46
|
end
|
47
47
|
|
48
48
|
|
49
|
-
def delete id
|
49
|
+
def delete id
|
50
50
|
find_item(id).destroy
|
51
|
-
|
51
|
+
true
|
52
52
|
end
|
53
53
|
|
54
54
|
|
55
|
-
def delete_selected selected
|
55
|
+
def delete_selected selected
|
56
56
|
model.where(id: selected).map(&:destroy)
|
57
|
-
|
57
|
+
true
|
58
58
|
end
|
59
59
|
|
60
60
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: crudle
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Slee Woo
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-07-17 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Building blocks for opinionated CRUD interfaces
|
14
14
|
email:
|
@@ -46,5 +46,5 @@ rubyforge_project:
|
|
46
46
|
rubygems_version: 2.5.1
|
47
47
|
signing_key:
|
48
48
|
specification_version: 4
|
49
|
-
summary: '["crudle-0.0.
|
49
|
+
summary: '["crudle-0.0.4", "Building blocks for opinionated CRUD interfaces"]'
|
50
50
|
test_files: []
|