no-autocomplete-rails 0.0.1 → 0.0.2
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/README.md +56 -2
- data/lib/no/autocomplete/rails/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 28fe24f92762b77a173d4bc1b5956b49961f6698
|
4
|
+
data.tar.gz: 75c762d8aca83a831bd12f727a7e80ec6e4277bf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cdf568b4b68948c736f1c597abd2bb1ce31e4af47559f2c02df2d1d3e73dbaec414005b5e437935b6db63156c0cfdd5c9794788c4e8aac701248bd743bffbc48
|
7
|
+
data.tar.gz: a9a06bbe80f0b377da4302eba81391cfe34e3f00ba0112a3d1f7d8d9ddf13d477a6a995b6ea01ffbaf68fdb1460463ebb106cf59def2c1402faf9bd3aefb2aaf
|
data/README.md
CHANGED
@@ -1,2 +1,56 @@
|
|
1
|
-
## No
|
2
|
-

|
3
|
+
|
4
|
+
jQuery plugin packaged in a gem to disable/enable autocomplete on forms.
|
5
|
+
Works with rails simple_form not disabling autocomplete.
|
6
|
+
|
7
|
+
Installation
|
8
|
+
------------
|
9
|
+
|
10
|
+
Add this line to your application's `Gemfile`:
|
11
|
+
```ruby
|
12
|
+
gem 'no-autocomplete-rails'
|
13
|
+
```
|
14
|
+
|
15
|
+
And then execute:
|
16
|
+
```
|
17
|
+
bundle install
|
18
|
+
```
|
19
|
+
|
20
|
+
Add to your `application.js` file:
|
21
|
+
```javascript
|
22
|
+
//= require no-autocomplete-rails
|
23
|
+
```
|
24
|
+
|
25
|
+
Usage
|
26
|
+
-----
|
27
|
+
|
28
|
+
To disable on `document ready`. Just add `no_autocomplete: ""`
|
29
|
+
|
30
|
+
#### SimpleForm Example:
|
31
|
+
|
32
|
+
```rails
|
33
|
+
<%= f.input :subject, input_html: { no_autocomplete: "" } %>
|
34
|
+
```
|
35
|
+
|
36
|
+
#### Target certain elements
|
37
|
+
|
38
|
+
```rails
|
39
|
+
<%= f.input :subject, input_html: { id: "form-subject-input" %>
|
40
|
+
```
|
41
|
+
|
42
|
+
```javascript
|
43
|
+
// Turn on
|
44
|
+
$("#form-subject-input").noAutocomplete();
|
45
|
+
|
46
|
+
// Toggle off
|
47
|
+
$("#form-subject-input").noAutocomplete({toggle: "off"});
|
48
|
+
|
49
|
+
// Toggle on
|
50
|
+
$("#form-subject-input").noAutocomplete({toggle: "on"});
|
51
|
+
```
|
52
|
+
|
53
|
+
### Non-Rails
|
54
|
+
|
55
|
+
Just copy the `no-autocomplete-rails` file from `lib/assets/javascripts` to
|
56
|
+
wherever you want it.
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: no-autocomplete-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- JaredCowan
|
@@ -38,7 +38,7 @@ files:
|
|
38
38
|
- lib/no/autocomplete/rails.rb
|
39
39
|
- lib/no/autocomplete/rails/engine.rb
|
40
40
|
- lib/no/autocomplete/rails/version.rb
|
41
|
-
homepage:
|
41
|
+
homepage: https://github.com/JaredCowan/no-autocomplete-rails
|
42
42
|
licenses:
|
43
43
|
- MIT
|
44
44
|
metadata: {}
|