moomerman-rambo 0.4.10 → 0.4.11
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/lib/rambo/controller.rb +4 -0
- data/lib/rambo/controller/redirect.rb +2 -2
- metadata +1 -1
data/lib/rambo/controller.rb
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
module Redirect
|
|
2
2
|
def redirect(destination, options={})
|
|
3
3
|
destination = destination.to_s if destination.is_a? Symbol
|
|
4
|
-
unless destination[0,1] == "/"
|
|
4
|
+
unless destination[0,1] == "/" or destination =~ /^http:\/\// or destination =~ /^file:\/\//
|
|
5
5
|
destination = "/#{self.controller}/#{destination}"
|
|
6
6
|
end
|
|
7
|
-
|
|
7
|
+
puts "redirecting to #{destination}"
|
|
8
8
|
|
|
9
9
|
@rendered = true
|
|
10
10
|
response.status = 302
|