class UrlController < ApplicationController
def index
end
def redirect
end
def create_url
if request.post? and params[:redirect_to]
puts Url.is_a?(ActiveRecord::Base)
params[:url] = String.random(3)
if Url.save(params)
render_text "http://l.ocalho.st/#{params[:url]}"
end
end
end
end