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.
@@ -28,5 +28,9 @@ module Rambo
28
28
  request.env['rack.session'] ||= {}
29
29
  end
30
30
 
31
+ def host
32
+ self.request.env['HTTP_HOST']
33
+ end
34
+
31
35
  end
32
36
  end
@@ -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
- #puts "redirecting to #{destination}"
7
+ puts "redirecting to #{destination}"
8
8
 
9
9
  @rendered = true
10
10
  response.status = 302
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: moomerman-rambo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.10
4
+ version: 0.4.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Richard Taylor