destroyall 0.0.2 → 0.0.10
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/Gemfile.lock +1 -1
- data/README.md +4 -6
- data/destroyall-0.0.2.gem +0 -0
- data/destroyall-0.0.3.gem +0 -0
- data/destroyall-0.0.4.gem +0 -0
- data/destroyall-0.0.5.gem +0 -0
- data/destroyall-0.0.6.gem +0 -0
- data/destroyall-0.0.7.gem +0 -0
- data/destroyall-0.0.8.gem +0 -0
- data/destroyall-0.0.9.gem +0 -0
- data/lib/destroyall/version.rb +1 -1
- metadata +10 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: afd48fee9dae13976aafca1c3742d45502f1ad05
|
4
|
+
data.tar.gz: 8402c41d95c24ce7bbf6a872b2ed954a9c8ad811
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e654a3cb50e1ee08e30930171c671407d94c64c886182d02929b3531aa10021bd009c9de6f131d68e6117fbdeb2e23e6ea09d19daa53c09b36a82a486270743d
|
7
|
+
data.tar.gz: 748930103c6d68ed8c7cee3669aa0d1a86663e352f15d58c99a0593d9733031a31cccae4934aa6b204db027f0284ff9cc4edc72452aab32c245aa2aa0ab49d02
|
data/Gemfile.lock
CHANGED
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
|
-
<%=
|
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
|
-
<%=
|
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
|
data/lib/destroyall/version.rb
CHANGED
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.
|
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-
|
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
|