diff options
author | Patrick J Cherry <patrick@bytemark.co.uk> | 2011-07-20 16:16:14 +0100 |
---|---|---|
committer | Patrick J Cherry <patrick@bytemark.co.uk> | 2011-07-20 16:16:14 +0100 |
commit | 3185e5d746abda1b7f42ecdbd74ec14359fda3bc (patch) | |
tree | e74ee3a587d62fdf68f79093af2202188aed3bc5 /lib/mauve/web_interface.rb | |
parent | 4ffe222986d4e3565a1f189325d77b33f90dfa15 (diff) | |
parent | d3a3cfef9650b08f62db62bd7e86b673f9d77d0b (diff) |
merge
Diffstat (limited to 'lib/mauve/web_interface.rb')
-rw-r--r-- | lib/mauve/web_interface.rb | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/mauve/web_interface.rb b/lib/mauve/web_interface.rb index 4594e10..4bb9517 100644 --- a/lib/mauve/web_interface.rb +++ b/lib/mauve/web_interface.rb @@ -22,7 +22,14 @@ module Mauve def self._logger Log4r::Logger.new(self.to_s) end - + + # + # Generic URL for + # + def self.url_for(obj) + [Mauve::HTTPServer.instance.base_url, obj.class.to_s.split("::").last.downcase, obj.id.to_s].join("/") + end + use Rack::CommonLogger use Rack::Chunked use Rack::ContentLength @@ -519,7 +526,6 @@ EOF env['rack.errors'] = RackErrorsProxy.new(logger) super(env) end - - end + end end |