redirectr 0.0.8 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/README +1 -0
  2. data/lib/redirectr.rb +8 -7
  3. 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
 
@@ -39,18 +39,18 @@ module Redirectr
39
39
  Redirectr::REFERRER_PARAM_NAME
40
40
  end
41
41
 
42
- # Return the path of the current request.
43
- # note that this path does NOT include any query parameters nor the hostname,
44
- # thus allowing you to navigate within the application only. This may be changed
45
- # in the future. If you need a different behaviour now, just overwrite this method
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
- # maybe we want to use request.env['REQUEST_URI'] in the future...?
53
- request.env['PATH_INFO']
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.8
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: 2013-03-27 00:00:00.000000000 Z
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 submussion
15
+ redirect URLs after form submission
16
16
  email: wvk@consolving.de
17
17
  executables: []
18
18
  extensions: []