Sha256: d3f415dc8869427de8507786117892c36d60ce968e32874fa7b78a1a63bda2b1
Contents?: true
Size: 575 Bytes
Versions: 6
Compression:
Stored size: 575 Bytes
Contents
class Shortener::ShortenedUrlsController < ActionController::Metal include ActionController::StrongParameters include ActionController::Redirecting include ActionController::Instrumentation include Rails.application.routes.url_helpers include Shortener def show token = ::Shortener::ShortenedUrl.extract_token(params[:id]) track = Shortener.ignore_robots.blank? || request.human? url = ::Shortener::ShortenedUrl.fetch_with_token(token: token, additional_params: params, track: track) redirect_to url[:url], status: :moved_permanently end end
Version data entries
6 entries across 6 versions & 1 rubygems