Sha256: c3394c182d1a80922641bccdb7b40cbf09ba288fea2bdc6b4e2ff6ece1be8691

Contents?: true

Size: 790 Bytes

Versions: 6

Compression:

Stored size: 790 Bytes

Contents

# frozen_string_literal: true

module Tanshuku
  # Tanshuku's Rails engine.
  #
  # @note
  #   The example below generates a routing +GET `/t/:key` to `Tanshuku::UrlsController#show`+. When your Rails app
  #   receives a request to +/t/abcdefghij0123456789+, +Tanshuku::UrlsController#show+ will be called and a
  #   +Tanshuku::Url+ record with a key +abcdefghij0123456789+ will be found. Then the request will be redirected to the
  #   +Tanshuku::Url+ record's original URL.
  #
  # @example To mount Tanshuku to your Rails app
  #   # config/routes.rb
  #   Rails.application.routes.draw do
  #     mount Tanshuku::Engine, at: "/t"
  #   end
  class Engine < ::Rails::Engine
    isolate_namespace Tanshuku

    config.generators do |g|
      g.test_framework :rspec
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
tanshuku-0.0.19 lib/tanshuku/engine.rb
tanshuku-0.0.18 lib/tanshuku/engine.rb
tanshuku-0.0.17 lib/tanshuku/engine.rb
tanshuku-0.0.16 lib/tanshuku/engine.rb
tanshuku-0.0.15 lib/tanshuku/engine.rb
tanshuku-0.0.14 lib/tanshuku/engine.rb