Sha256: 170d4c7692fb9d7449198772174d42aa06f2281596dfff2b3f9509e4795e2dc0

Contents?: true

Size: 247 Bytes

Versions: 12

Compression:

Stored size: 247 Bytes

Contents

# frozen_string_literal: true

module Tanshuku
  class UrlsController < ActionController::API
    def show
      url = Url.find_by!(key: params[:key])
      redirect_to url.url, status: :moved_permanently, allow_other_host: true
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
tanshuku-0.0.12 app/controllers/tanshuku/urls_controller.rb
tanshuku-0.0.11 app/controllers/tanshuku/urls_controller.rb
tanshuku-0.0.10 app/controllers/tanshuku/urls_controller.rb
tanshuku-0.0.9 app/controllers/tanshuku/urls_controller.rb
tanshuku-0.0.8 app/controllers/tanshuku/urls_controller.rb
tanshuku-0.0.7 app/controllers/tanshuku/urls_controller.rb
tanshuku-0.0.6 app/controllers/tanshuku/urls_controller.rb
tanshuku-0.0.5 app/controllers/tanshuku/urls_controller.rb
tanshuku-0.0.4 app/controllers/tanshuku/urls_controller.rb
tanshuku-0.0.3 app/controllers/tanshuku/urls_controller.rb
tanshuku-0.0.2 app/controllers/tanshuku/urls_controller.rb
tanshuku-0.0.1 app/controllers/tanshuku/urls_controller.rb