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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 518edfc85e64b5299f952a7985ff74a0e0d09da5
4
- data.tar.gz: bc3c58be4766df258be5a65e323049baf70e13a3
3
+ metadata.gz: d4df21071ae1becaf1b7a48339adb2b5aaab2172
4
+ data.tar.gz: e1cc117d3649a74f3ab452427f82cb865147c56c
5
5
  SHA512:
6
- metadata.gz: 2afa5a283d9ae520bad351d8b72753428d623fba958367bd3b88f3923fe0bc7ae5c94e7ec4934d750241dc47620ad5d6ba42d9d4bd6f66f26a997fca1f5e41b2
7
- data.tar.gz: 561a590e9fe3f83e177dee490483a6c26ee34e25e3ae5fc7f3b487f32e2d89f13591be2e1a363608df2d20aeb1f24f69caa18610eec6fa8a484188cfbe66eaea
6
+ metadata.gz: 8bc48b43220475a92eff97e949102cb922b8ee2161ebac497d8ad068bf3eb60f8758d71b06146b904910896a2c3be7699dd2251af43c34a86f2892383a066ef3
7
+ data.tar.gz: 1c558b3d80b0e6dbcda0c9ada7e636f2e77d61baaa5314d0ee77af9ef100a14f0ad3460461213ceaba3350a78a62e63da060fe7455d76b5ad0c4768f360ae6c7
@@ -1,3 +1,3 @@
1
1
  module Crudle
2
- VERSION = '0.0.3'.freeze
2
+ VERSION = '0.0.4'.freeze
3
3
  end
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 init params
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| {self: list_serializer(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, params
49
+ def delete id
50
50
  find_item(id).destroy
51
- list(params)
51
+ true
52
52
  end
53
53
 
54
54
 
55
- def delete_selected selected, params
55
+ def delete_selected selected
56
56
  model.where(id: selected).map(&:destroy)
57
- list(params)
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.3
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-05-23 00:00:00.000000000 Z
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.3", "Building blocks for opinionated CRUD interfaces"]'
49
+ summary: '["crudle-0.0.4", "Building blocks for opinionated CRUD interfaces"]'
50
50
  test_files: []