redirect_on_back 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MWU0ZDJkZTk4MmYzY2Q5ZTczMmZiNGQwNTYzNDRjYjY4ZmQ3YmE0Zg==
4
+ ZWMxNzdmZGQ0ZTFlZThkY2Y3YmQyZjk0YTk1Y2M3MmE3ODUwYzJmMw==
5
5
  data.tar.gz: !binary |-
6
- ZjJjZWRiYmZjMTYzZDA1MjY3MWQzNGMyMjI0NWRmZGQ3MGE2Mjk2Ng==
6
+ YjczZTlhNTdhMjc0NzVlNmUwYTFlZmZmY2U3YmRjZTk5Yjk1NzEzZA==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- MzE0NmIyOWY3MjJjNzJmYTFjYzkwYTU4NzNlYmZlNjQ2NzE3NWFlM2NkNGU5
10
- OTA0ZjFmZTMyNGEwZDY4ZTk3MzZiZTI1MDU0MDdhODczN2M0MzJjZGNkNDAx
11
- NGViYTlhNzMyYzEwNmE0YjcwZTMzMmFiYjk3NDg4ODgxMzQ4ZmE=
9
+ ZWI3ZmRmODg0NWFkNmI5N2Y0ODE2OWQwZDA3ZjNmZjI3Nzg0NDcxYjljOWY1
10
+ Y2U0OTBhNWM1YzY0ZTFiNGE5YjAzZDAyODQ1NGRjMWJmNDc1Y2ZmYjdmMWNh
11
+ YzMyZGYyZWQwOWI1MjU1NGNhMGJmZWI1YWNkYjU0YzFjMDNlNTQ=
12
12
  data.tar.gz: !binary |-
13
- ZTdhYTZlOGY1YzNjZjRlYzU5NjYyNTBiOWQ3MzY5NDIxZWM1ZGU0ZWYzMTI1
14
- MWRkOGZlY2JhZGMxN2ZlYTg5NTc1NzliMTFiMTJkMmIxYTRlMzIwMzdhZmU4
15
- Y2I4MThhMTkyMmUzNTAwMWE1YWVmMjg0NzNkYzVjNmVhNDNhYjE=
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
- `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.
49
- If you need to disable it in another forms, simply add `disable_redirect_on_back: true` to the `data` hash of that form:
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 :user, data: {disable_redirect_on_back: true}
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[:action] || '/')
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
@@ -1,3 +1,3 @@
1
1
  module RedirectOnBack
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redirect_on_back
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - yossi-shasho