redirect_on_back 0.0.5 → 0.0.6
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 +8 -8
- data/README.md +5 -4
- data/lib/redirect_on_back/railtie.rb +1 -1
- data/lib/redirect_on_back/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZWMxNzdmZGQ0ZTFlZThkY2Y3YmQyZjk0YTk1Y2M3MmE3ODUwYzJmMw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YjczZTlhNTdhMjc0NzVlNmUwYTFlZmZmY2U3YmRjZTk5Yjk1NzEzZA==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZWI3ZmRmODg0NWFkNmI5N2Y0ODE2OWQwZDA3ZjNmZjI3Nzg0NDcxYjljOWY1
|
10
|
+
Y2U0OTBhNWM1YzY0ZTFiNGE5YjAzZDAyODQ1NGRjMWJmNDc1Y2ZmYjdmMWNh
|
11
|
+
YzMyZGYyZWQwOWI1MjU1NGNhMGJmZWI1YWNkYjU0YzFjMDNlNTQ=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
Y2RlOGJkZGQ3MjRiOWRiZGIzZGZhYjMwZmRhN2YyYmU1NjcxOGE3YzM3ODZh
|
14
|
+
ZWFmZmM0Njc2N2E0OTY5MGEwOWNiNjM1Y2U5ZjNiODY4MTg1ODE5YmQ2ZDU3
|
15
|
+
NTkxMDE5NWIwYTU3M2YzZjNmNTY4YzU4NWFiODkwYzQ4MWZjZmY=
|
data/README.md
CHANGED
@@ -44,12 +44,13 @@ In your controller actions:
|
|
44
44
|
|
45
45
|
## How to Disable
|
46
46
|
|
47
|
-
|
48
|
-
However, it doesn't add the field to forms that point to different domains.
|
49
|
-
|
47
|
+
redirect_on_back uses a hidden form field, which it automatically adds to forms.
|
48
|
+
However, it doesn't add the field to forms that point to different domains, so, for instance, it won't interfere with Amazon S3 file uploads.
|
49
|
+
|
50
|
+
To manually disable it in a form, add `disable_redirect_on_back: true` to the `data` hash of that form:
|
50
51
|
|
51
52
|
```erb
|
52
|
-
form_tag
|
53
|
+
form_tag @user, data: {disable_redirect_on_back: true}
|
53
54
|
```
|
54
55
|
|
55
56
|
## Contributing
|
@@ -8,7 +8,7 @@ module RedirectOnBack
|
|
8
8
|
|
9
9
|
def extra_tags_for_form(html_options)
|
10
10
|
orig_tags = orig_extra_tags_for_form(html_options)
|
11
|
-
if !disable_redirect_on_back(html_options) && is_internal_action?(html_options[
|
11
|
+
if !disable_redirect_on_back(html_options) && is_internal_action?(html_options['action'] || '/')
|
12
12
|
orig_tags << "<input name='_usec' type='hidden' value='#{Time.now.usec}' />".html_safe
|
13
13
|
end
|
14
14
|
orig_tags
|