lib/tmin/server.rb in tmin-0.0.3 vs lib/tmin/server.rb in tmin-0.0.4
- old
+ new
@@ -156,11 +156,11 @@
before do
@authenticated = has_valid_api_cookie?
@config = config
@highlight = nil
- @title = "Firefly at http://#{@config[:hostname]}"
+ @title = "tminus.it at http://#{@config[:hostname]}"
set :session_secret, @config[:session_secret]
end
get '/' do
@@ -271,11 +271,11 @@
if @url.nil?
status 404
"Sorry, that code is unknown."
else
- @url.register_click!
- redirect @url.url, 301
+ @short_url = "http://#{config[:hostname]}/#{@url.code}"
+ haml :redirect
end
end
def initialize config = {}, &blk
super