fake_password_field 1 → 1.1
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 +5 -3
- data/lib/fake_password_field/helpers.rb +2 -2
- data/lib/fake_password_field/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4f522d8c3abe3cb5917c5389bbbbbd93996ff79b
|
|
4
|
+
data.tar.gz: 15b4cb332717b8143100eb7f1c99513ef751adb1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 193d2226ddca4262369530ef3f75999d77a942a985bb58ad572ed5284735834a5159214d71910bb90d61f13618d9f536a152f73214eeadb324ae7985828f3a19
|
|
7
|
+
data.tar.gz: 90f542030942c95709b35cc9f0cf54cce38bbfe8fcfe0ba3a466a21f9794b6e14a0915887f727f4fe8c9d9506ba7a597d559c2b2fce8c89a9bed149016f1c616
|
data/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Prevents Safari from autofilling password fields you don't want autofilled. See http://stackoverflow.com/questions/22817801/how-to-disable-auto-fill-in-safari-7 for a good explanation of the bug.
|
|
4
4
|
|
|
5
|
-
Tested on Rails 4
|
|
5
|
+
Tested on Rails 4. (Probably works on other versions too, if anyone is keen to test & update the gem's dependencies.)
|
|
6
6
|
|
|
7
7
|
### Installing
|
|
8
8
|
|
|
@@ -18,11 +18,13 @@ Or install it yourself as:
|
|
|
18
18
|
|
|
19
19
|
$ gem install fake_password_field
|
|
20
20
|
|
|
21
|
+
Available on RubyGems: https://rubygems.org/gems/fake_password_field
|
|
22
|
+
|
|
21
23
|
### Usage
|
|
22
24
|
|
|
23
25
|
In your views, replace `password_field_tag` with `fake_password_field_tag`. Or if you're using a FormBuilder (`form_for(@object)...`), replace `f.password_field` with `f.fake_password_field`.
|
|
24
26
|
|
|
25
|
-
|
|
27
|
+
All other parameters should be the same - you shouldn't need to change anything else in your view code. Please create an issue if that isn't the case.
|
|
26
28
|
|
|
27
29
|
### How it works
|
|
28
30
|
|
|
@@ -33,7 +35,7 @@ The snippet looks like this:
|
|
|
33
35
|
````javascript
|
|
34
36
|
<script>
|
|
35
37
|
// http://stackoverflow.com/q/22817801/641293
|
|
36
|
-
var i = document.
|
|
38
|
+
var i = document.getElementsByTagName('input'), e = i[i.length - 1]
|
|
37
39
|
setTimeout(function() { e.type = 'password' }, 500)
|
|
38
40
|
</script>
|
|
39
41
|
````
|
|
@@ -6,7 +6,7 @@ class FormBuilder
|
|
|
6
6
|
javascript = <<-STR
|
|
7
7
|
<script>
|
|
8
8
|
// http://stackoverflow.com/q/22817801/641293
|
|
9
|
-
var i = document.
|
|
9
|
+
var i = document.getElementsByTagName('input'), e = i[i.length - 1]
|
|
10
10
|
setTimeout(function() { e.type = 'password' }, 500)
|
|
11
11
|
</script>
|
|
12
12
|
STR
|
|
@@ -24,7 +24,7 @@ module FormTagHelper
|
|
|
24
24
|
javascript = <<-STR
|
|
25
25
|
<script>
|
|
26
26
|
// http://stackoverflow.com/q/22817801/641293
|
|
27
|
-
var i = document.
|
|
27
|
+
var i = document.getElementsByTagName('input'), e = i[i.length - 1]
|
|
28
28
|
setTimeout(function() { e.type = 'password' }, 500)
|
|
29
29
|
</script>
|
|
30
30
|
STR
|