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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 444a4eefa01c242b794d90c3a3b3e0a7d6f5be3891908eeced6b22025c813bce
4
- data.tar.gz: bf6e28906dc51b9fa7f656c54854ce8bf08b24b1d7ef50aa2ad501ec95cfa1bf
3
+ metadata.gz: 30d264f17bad1438175d14a5a016f6670214339d3107af65e483c70a9014f740
4
+ data.tar.gz: 0ec24ab3b80a9d6662ab21240cc49cbf0d3c2abc051193b11154271475d4c54e
5
5
  SHA512:
6
- metadata.gz: f7b08104497bf07d7926b1cc1ec641ca70553950be5987a381c3edf8953cd8b1271fdc790e6010288de68a24ac1f4f8c08a876a7ac0d2e53cbef984c57e05a5a
7
- data.tar.gz: 9872d2361adc8c51832f40910b8e9f4d4033ee31a5153f61cf876375daf389407731d60f6f31026965b4c5a935e300d9988ddafdeeb37b165faad1bf5efd172f
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.
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SmartButtons
4
- VERSION = '1.0'
4
+ VERSION = '1.0.0.1'
5
5
  end
@@ -27,4 +27,5 @@ Gem::Specification.new do |spec|
27
27
  spec.add_development_dependency 'rubocop'
28
28
 
29
29
  spec.add_dependency 'simple_form'
30
+ spec.add_dependency 'nokogiri', '>= 1.10.8'
30
31
  end
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: '1.0'
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-01-25 00:00:00.000000000 Z
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