destroyall 0.0.2 → 0.0.10

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: 19307ce6b9f4e257eeb71043ba5a28477e51fde6
4
- data.tar.gz: e09eebd0d33c63b56ea5529a41c152353bd7d15c
3
+ metadata.gz: afd48fee9dae13976aafca1c3742d45502f1ad05
4
+ data.tar.gz: 8402c41d95c24ce7bbf6a872b2ed954a9c8ad811
5
5
  SHA512:
6
- metadata.gz: 2ce84fe09e42533e22c41dc11361866f484b38c4876160b4e6b9d1f466206bd98e56c28de3f39686337ee7566c3371a8fd2d75912647a06edf45248176d441c9
7
- data.tar.gz: ce3c12c85888d7682ae8c700208373fdacd9c99b7f13cd3d2274031fb6dfb8a0fbaa4d230b1bef70c85fb7594ad4c5039de5b068543e2a79c3b34ade62a31c3d
6
+ metadata.gz: e654a3cb50e1ee08e30930171c671407d94c64c886182d02929b3531aa10021bd009c9de6f131d68e6117fbdeb2e23e6ea09d19daa53c09b36a82a486270743d
7
+ data.tar.gz: 748930103c6d68ed8c7cee3669aa0d1a86663e352f15d58c99a0593d9733031a31cccae4934aa6b204db027f0284ff9cc4edc72452aab32c245aa2aa0ab49d02
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- destroyall (0.0.1)
4
+ destroyall (0.0.9)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -4,6 +4,8 @@ Created by [Alexandr Basan]()
4
4
 
5
5
  TODO: Simple gem for quick add destroy all method for all models.
6
6
 
7
+ <b>Attention!!!. This gem delete all records from database without confirmation!!!</b>
8
+
7
9
  ## Installation
8
10
 
9
11
  Add this line to your application's Gemfile:
@@ -43,15 +45,11 @@ In second method gem destroy all records in table Users where user status = inac
43
45
 
44
46
  Also you maybe need to create form for delete all records in your model
45
47
 
46
- <%= form_for(destroy_all(model), :html => {:method => 'delete'}) do |f| %>
47
- <%= f.submit "Delete" %>
48
- <% end %>
48
+ <%= link_to "Destroy all", data: { confirm: 'Are you sure?' }, :onclick => Destroyall.destroy_all(User) %>
49
49
 
50
50
  or you can use simple method without gem
51
51
 
52
- <%= form_for(User.destroy_all("last_login < '2004-04-04'"), :html => {:method => 'delete'}) do |f| %>
53
- <%= f.submit "Delete" %>
54
- <% end %>
52
+ <%= link_to "Destroy all", data: { confirm: 'Are you sure?' }, :onclick => User.destroy_all %>
55
53
 
56
54
  If you need more information about methods using for gem work, please see rubydoc
57
55
 
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -1,3 +1,3 @@
1
1
  module Destroyall
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.10"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: destroyall
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexandr Basan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-24 00:00:00.000000000 Z
11
+ date: 2014-09-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -53,6 +53,14 @@ files:
53
53
  - README.md
54
54
  - Rakefile
55
55
  - destroyall-0.0.1.gem
56
+ - destroyall-0.0.2.gem
57
+ - destroyall-0.0.3.gem
58
+ - destroyall-0.0.4.gem
59
+ - destroyall-0.0.5.gem
60
+ - destroyall-0.0.6.gem
61
+ - destroyall-0.0.7.gem
62
+ - destroyall-0.0.8.gem
63
+ - destroyall-0.0.9.gem
56
64
  - destroyall.gemspec
57
65
  - lib/destroyall.rb
58
66
  - lib/destroyall/version.rb