lib/petit/app.rb
# 301 Redirects requests to the shortcode destination.
# Note: this method increments the shortcode's hit counter
# @param shortcode [Shortcode] the shortcode object from which to build the redirect URL
301 Redirects requests to the shortcode destination.
Note: this method increments the shortcode's hit counter
301 Redirects requests to the shortcode destination . Note : this method increments the shortcode ' s hit counter
def redirect_to(shortcode)
      url = ''
      url += if shortcode.ssl?
               'https://'
             else
               'http://'
             end
      url += shortcode.destination
      shortcode.hit
      redirect url, 301
    end
def redirect_to ( shortcode ) url = '' url += if shortcode . ssl? 'https://' else 'http://' end url += shortcode . destination shortcode . hit redirect url , 301 end
301 Redirects requests to the shortcode destination.
301 Redirects requests to the shortcode destination .
shortcode
the shortcode object from which to build the redirect URL
the shortcode object from which to build the redirect URL