smart_buttons 1.0 → 1.0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +20 -1
- data/lib/smart_buttons/version.rb +1 -1
- data/smart_buttons.gemspec +1 -0
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 30d264f17bad1438175d14a5a016f6670214339d3107af65e483c70a9014f740
|
4
|
+
data.tar.gz: 0ec24ab3b80a9d6662ab21240cc49cbf0d3c2abc051193b11154271475d4c54e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1938fe97828cb0ef3a865bf2bdac74cdbf49bd1c67e82ca90d56fa5e74cf181a95b0a234521cbfccff4c09188a6b3eb057d217b2d5032f045b771ecc1e9a5286
|
7
|
+
data.tar.gz: bce690c2e82b2d4170271460216cc998a2e2517e765b1e5d1b31695d00c70de7e5afc7cbe1aceef391897f97062bbb71736d7c527e4adea678349e5aec0684af
|
data/README.md
CHANGED
@@ -33,12 +33,31 @@ end
|
|
33
33
|
|
34
34
|
If you need button with HTTP/DELETE method, just use
|
35
35
|
|
36
|
-
```
|
36
|
+
```ruby
|
37
37
|
delete_button url, form_options: { class: :some_form_class }, button_options: { class: :some_button_class } do
|
38
38
|
here_content_which_will_be_inside_of_button
|
39
39
|
end
|
40
40
|
```
|
41
41
|
|
42
|
+
### HTTP / PATCH
|
43
|
+
|
44
|
+
If you need to make changes with ActiveRecord model, just use
|
45
|
+
|
46
|
+
```ruby
|
47
|
+
patch_button(
|
48
|
+
record: some_record_you_gonna_change,
|
49
|
+
controller: ControllerWhichWilChangeYourModel,
|
50
|
+
action: :action_in_this_controller,
|
51
|
+
parameters: { url: parameters },
|
52
|
+
attributes: { attribute1: value, attribute2: value },
|
53
|
+
model_name: record.model_name,
|
54
|
+
button_options: { class: :some_button_class },
|
55
|
+
form_options: { class: :some_form_class }
|
56
|
+
) do
|
57
|
+
here_content_which_will_be_inside_of_button
|
58
|
+
end
|
59
|
+
```
|
60
|
+
|
42
61
|
## Contributing
|
43
62
|
|
44
63
|
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/smart_buttons.
|
data/smart_buttons.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: smart_buttons
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 1.0.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pavel Kalashnikov
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-02-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -108,6 +108,20 @@ dependencies:
|
|
108
108
|
- - ">="
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: nokogiri
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: 1.10.8
|
118
|
+
type: :runtime
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: 1.10.8
|
111
125
|
description: Replacement of Rails `link_to` method with static HTML
|
112
126
|
email:
|
113
127
|
- kalashnikovisme@gmail.com
|