simple_ajax_form 0.1.25 → 0.1.26
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +69 -0
- data/README.md +21 -11
- data/lib/simple_ajax_form/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 35d4e617c0dbc177dbae66a8342f2a682573fec458d05750bb6bd12eb2772233
|
4
|
+
data.tar.gz: a345e60ec1d393b220efd03abbcc9b3ddb6bf2bf377d7bad49f1b0340b708aa6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1562f82d240ce0c6e9361d060281f3de334278bd403b81a8a243c18104bb60304e88b38857c5464b90ac3bb59da2ddf19c5882a951afad48d57a1e8b1e531978
|
7
|
+
data.tar.gz: e36423e8c0bd930fbd20b4d39c6e866e8a343e0e7aab52dcfabdbd19058a6b4933b39ee09eb28fe3c1b9f6929749e4bf5f197025f19ed9cc977cba7c78197063
|
data/Gemfile.lock
ADDED
@@ -0,0 +1,69 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
simple_ajax_form (0.1.26)
|
5
|
+
activesupport (~> 7.0, >= 7.0.4.3)
|
6
|
+
|
7
|
+
GEM
|
8
|
+
remote: https://rubygems.org/
|
9
|
+
specs:
|
10
|
+
activesupport (7.0.4.3)
|
11
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
12
|
+
i18n (>= 1.6, < 2)
|
13
|
+
minitest (>= 5.1)
|
14
|
+
tzinfo (~> 2.0)
|
15
|
+
ast (2.4.2)
|
16
|
+
concurrent-ruby (1.2.2)
|
17
|
+
diff-lcs (1.5.0)
|
18
|
+
i18n (1.13.0)
|
19
|
+
concurrent-ruby (~> 1.0)
|
20
|
+
json (2.6.3)
|
21
|
+
minitest (5.18.0)
|
22
|
+
parallel (1.23.0)
|
23
|
+
parser (3.2.2.0)
|
24
|
+
ast (~> 2.4.1)
|
25
|
+
rainbow (3.1.1)
|
26
|
+
rake (13.0.6)
|
27
|
+
regexp_parser (2.8.0)
|
28
|
+
rexml (3.2.5)
|
29
|
+
rspec (3.12.0)
|
30
|
+
rspec-core (~> 3.12.0)
|
31
|
+
rspec-expectations (~> 3.12.0)
|
32
|
+
rspec-mocks (~> 3.12.0)
|
33
|
+
rspec-core (3.12.2)
|
34
|
+
rspec-support (~> 3.12.0)
|
35
|
+
rspec-expectations (3.12.3)
|
36
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
37
|
+
rspec-support (~> 3.12.0)
|
38
|
+
rspec-mocks (3.12.5)
|
39
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
40
|
+
rspec-support (~> 3.12.0)
|
41
|
+
rspec-support (3.12.0)
|
42
|
+
rubocop (1.50.2)
|
43
|
+
json (~> 2.3)
|
44
|
+
parallel (~> 1.10)
|
45
|
+
parser (>= 3.2.0.0)
|
46
|
+
rainbow (>= 2.2.2, < 4.0)
|
47
|
+
regexp_parser (>= 1.8, < 3.0)
|
48
|
+
rexml (>= 3.2.5, < 4.0)
|
49
|
+
rubocop-ast (>= 1.28.0, < 2.0)
|
50
|
+
ruby-progressbar (~> 1.7)
|
51
|
+
unicode-display_width (>= 2.4.0, < 3.0)
|
52
|
+
rubocop-ast (1.28.0)
|
53
|
+
parser (>= 3.2.1.0)
|
54
|
+
ruby-progressbar (1.13.0)
|
55
|
+
tzinfo (2.0.6)
|
56
|
+
concurrent-ruby (~> 1.0)
|
57
|
+
unicode-display_width (2.4.2)
|
58
|
+
|
59
|
+
PLATFORMS
|
60
|
+
x86_64-linux
|
61
|
+
|
62
|
+
DEPENDENCIES
|
63
|
+
rake (~> 13.0)
|
64
|
+
rspec (~> 3.0)
|
65
|
+
rubocop (~> 1.21)
|
66
|
+
simple_ajax_form!
|
67
|
+
|
68
|
+
BUNDLED WITH
|
69
|
+
2.4.6
|
data/README.md
CHANGED
@@ -1,31 +1,41 @@
|
|
1
1
|
# SimpleAjaxForm
|
2
2
|
|
3
|
-
|
3
|
+
This gem was made in order to "bring back" the form_with remote: true(ajax) feature to rails 7;
|
4
4
|
|
5
|
-
|
5
|
+
Since it became a bit hard to use ajax with rails 7, this gem's intention is to make it "easy to use" the feature again
|
6
6
|
|
7
7
|
## Installation
|
8
8
|
|
9
|
-
TODO: Replace `UPDATE_WITH_YOUR_GEM_NAME_PRIOR_TO_RELEASE_TO_RUBYGEMS_ORG` with your gem name right after releasing it to RubyGems.org. Please do not do it earlier due to security reasons. Alternatively, replace this section with instructions to install your gem from git if you don't plan to release to RubyGems.org.
|
10
|
-
|
11
9
|
Install the gem and add to the application's Gemfile by executing:
|
12
10
|
|
13
|
-
$ bundle add
|
11
|
+
$ bundle add simple_ajax_form
|
14
12
|
|
15
13
|
If bundler is not being used to manage dependencies, install the gem by executing:
|
16
14
|
|
17
|
-
$ gem install
|
15
|
+
$ gem install simple_ajax_form
|
16
|
+
|
17
|
+
If you prefer to put by yourself on Gemfile and run command bundle install:
|
18
|
+
```
|
19
|
+
gem 'simple_ajax_form', '~> 0.1.26'
|
20
|
+
```
|
18
21
|
|
19
22
|
## Usage
|
23
|
+
Inside of your <mark>.erb</mark> file:
|
24
|
+
|
25
|
+
1 - Add <mark>ajaxForm</mark> to your form_with class
|
20
26
|
|
21
|
-
|
27
|
+
2 - Insert the request helper right after the form_with tag:
|
28
|
+
```
|
29
|
+
<%= form_with ... ,class: '' do |f| >
|
30
|
+
<% end >
|
22
31
|
|
23
|
-
|
32
|
+
<%= SimpleAjaxForm::RequestHelper.enable_class_use_on_forms_html %>
|
33
|
+
```
|
24
34
|
|
25
|
-
|
35
|
+
## Under the hood
|
26
36
|
|
27
|
-
|
37
|
+
This gem uses vanilla javascript with fetch to perform the request
|
28
38
|
|
29
39
|
## Contributing
|
30
40
|
|
31
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
41
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/xitarps/simple_ajax_form.
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simple_ajax_form
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.26
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- XitaRps
|
@@ -42,6 +42,7 @@ files:
|
|
42
42
|
- ".rspec"
|
43
43
|
- ".rubocop.yml"
|
44
44
|
- Gemfile
|
45
|
+
- Gemfile.lock
|
45
46
|
- README.md
|
46
47
|
- Rakefile
|
47
48
|
- lib/simple_ajax_form.rb
|