redirectr 0.0.8 → 0.1.0
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.
- data/README +1 -0
- data/lib/redirectr.rb +8 -7
- metadata +3 -3
data/README
CHANGED
|
@@ -46,6 +46,7 @@ for more detailled examples, see the Rdoc documentation.
|
|
|
46
46
|
|
|
47
47
|
## Changelog
|
|
48
48
|
|
|
49
|
+
0.1.0: Use absolute URI instead of path in current_path method
|
|
49
50
|
0.0.8: Use ActiveSupport::Concern (Thanks to Dimitar Haralanov)
|
|
50
51
|
0.0.7: Add Rails 3.0 compatibility (Thanks to Falk Hoppe)
|
|
51
52
|
|
data/lib/redirectr.rb
CHANGED
|
@@ -39,18 +39,18 @@ module Redirectr
|
|
|
39
39
|
Redirectr::REFERRER_PARAM_NAME
|
|
40
40
|
end
|
|
41
41
|
|
|
42
|
-
# Return the
|
|
43
|
-
#
|
|
44
|
-
# thus allowing you to navigate
|
|
45
|
-
#
|
|
46
|
-
# in your controller.
|
|
42
|
+
# Return the complete uri of the current request.
|
|
43
|
+
# Note that this path does include ALL query parameters and the host name,
|
|
44
|
+
# thus allowing you to navigate back and forth between different hosts. If you
|
|
45
|
+
# want the pre-0.1.0 behaviour back, just overwrite this method
|
|
46
|
+
# in your controller so it returns "request.env['PATH_INFO']".
|
|
47
47
|
# Example:
|
|
48
48
|
#
|
|
49
49
|
# <%= link_to my_messages_path referrer_param => current_path %>
|
|
50
50
|
#
|
|
51
51
|
def current_path
|
|
52
|
-
|
|
53
|
-
request.env['
|
|
52
|
+
# request.env['PATH_INFO'] # old behaviour
|
|
53
|
+
request.env['REQUEST_URI']
|
|
54
54
|
end
|
|
55
55
|
|
|
56
56
|
# Return the referrer or the current path, it the former is not set.
|
|
@@ -132,6 +132,7 @@ module Redirectr
|
|
|
132
132
|
end # module Helpers
|
|
133
133
|
end # module Redirectr
|
|
134
134
|
|
|
135
|
+
|
|
135
136
|
ActionController::Base.send :include, Redirectr::ControllerMethods
|
|
136
137
|
ActionView::Helpers.send :include, Redirectr::Helpers
|
|
137
138
|
ActionView::Base.send :include, Redirectr::Helpers
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: redirectr
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0
|
|
4
|
+
version: 0.1.0
|
|
5
5
|
prerelease:
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
@@ -9,10 +9,10 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date:
|
|
12
|
+
date: 2014-01-22 00:00:00.000000000 Z
|
|
13
13
|
dependencies: []
|
|
14
14
|
description: Provides Rails-helper methods for referrer-style backlinks and setting
|
|
15
|
-
redirect URLs after form
|
|
15
|
+
redirect URLs after form submission
|
|
16
16
|
email: wvk@consolving.de
|
|
17
17
|
executables: []
|
|
18
18
|
extensions: []
|