handy_generators 0.1.9 → 0.1.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/handy_generators.gemspec +3 -5
- data/lib/handy_generators/version.rb +1 -1
- metadata +10 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f27e9123f919f500713b0b559fbf06af5375b672eb192211675fde47ac28ec6d
|
4
|
+
data.tar.gz: a181ce840f4aaab260677958c0bc7a665580dcbba1685a7b8ac89ff6f3c39743
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 02f0d28c5e04a9ddfeac38294e202eaec4486b3b70e329e66342662cc22720898c6f414aa32368ad696feea5b1820bf7d4bcd0f60a8ba49b4f10c9f056ae114d
|
7
|
+
data.tar.gz: 46ec463b22e82a772ec3955f0215b2358e50462a900410bbb59abd0c2885fe6e32ec29f42fb27db89bee9cadad96d2aefbfbc76e3e7ff79e040aa98bf1afdc95
|
data/Gemfile.lock
CHANGED
data/handy_generators.gemspec
CHANGED
@@ -15,23 +15,21 @@ Gem::Specification.new do |spec|
|
|
15
15
|
|
16
16
|
### Edit Links Helper
|
17
17
|
|
18
|
-
#### Generators
|
19
|
-
|
20
18
|
```
|
21
19
|
rails generate handy_generators:edit_links_helper
|
22
20
|
```
|
23
|
-
|
21
|
+
\n
|
24
22
|
This generator will add a helper and a partial for displaying edit and
|
25
23
|
delete links for a record. This uses pundit by default to check
|
26
24
|
whether a user should be able to edit and/or delete the record before
|
27
25
|
displaying the link. If you'd like to always display these links when
|
28
26
|
you use the helper in the view or handle the logic yourself, simply
|
29
27
|
add --pundit false to your command.
|
30
|
-
|
28
|
+
\n
|
31
29
|
```
|
32
30
|
rails generate handy_generators:edit_links_helper --pundit false
|
33
31
|
```
|
34
|
-
|
32
|
+
\n
|
35
33
|
#### Helpers
|
36
34
|
|
37
35
|
`edit_links(record:, edit_classes: '', delete_classes: '')`
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: handy_generators
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- DakotaLMartinez
|
@@ -80,16 +80,15 @@ dependencies:
|
|
80
80
|
- - ">"
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '4.0'
|
83
|
-
description: "\n ## Usage\n\n### Edit Links Helper\n\n
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
\nand `delete_classes`. Record is the only required parameter, \n`edit_classes`
|
83
|
+
description: "\n ## Usage\n\n### Edit Links Helper\n\n```\nrails generate handy_generators:edit_links_helper\n```\n\\n\nThis
|
84
|
+
generator will add a helper and a partial for displaying edit and\ndelete links
|
85
|
+
for a record. This uses pundit by default to check\nwhether a user should be able
|
86
|
+
to edit and/or delete the record before\ndisplaying the link. If you'd like to always
|
87
|
+
display these links when\nyou use the helper in the view or handle the logic yourself,
|
88
|
+
simply\nadd --pundit false to your command.\n\\n\n```\nrails generate handy_generators:edit_links_helper
|
89
|
+
--pundit false\n```\n\\n\n#### Helpers\n\n`edit_links(record:, edit_classes: '',
|
90
|
+
delete_classes: '')`\n\nThe `edit_links` helper receives three parameters `record`,
|
91
|
+
`edit_classes`, \nand `delete_classes`. Record is the only required parameter, \n`edit_classes`
|
93
92
|
and `delete_classes` will be empty by default, if you'd \nlike to add classes you
|
94
93
|
can pass them as parameters to the helper. The \ndefault helper uses pundit, and
|
95
94
|
it will check if the logged in user has\npermission to edit or delete the record
|