# -*- encoding : utf-8 -*-

class TinyUrlsController < ApplicationController
  layout "admin"
  
  def show
    @tiny_url = TinyUrl.find_by_slug(params[:id])
    @tiny_url.nbr_views = @tiny_url.nbr_views.to_i + 1
    @tiny_url.save
    redirect_to @tiny_url.url, :status => 301
  end

end
