Sha256: f82f5e041ce913b8f0c6609af5f6e22543fa698406afc6f1061de78bb9e73efb

Contents?: true

Size: 564 Bytes

Versions: 1

Compression:

Stored size: 564 Bytes

Contents

module TranslatableRoutes
  class Railtie < Rails::Railtie

    config.translatable_routes = ActiveSupport::OrderedOptions.new
    config.translatable_routes.selection = :prefix

    initializer 'translatable_routes' do
      ::ActionDispatch::Routing::Mapper.send :include, TranslatableRoutes::ActionDispatch::Mapper
      ::ActionDispatch::Routing::RouteSet::NamedRouteCollection.send :include, TranslatableRoutes::ActionDispatch::NamedRouteCollection
      ::ActionController::Base.send :include, TranslatableRoutes::ActionController::Base
    end
  
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
translatable_routes-1.2.0 lib/translatable_routes/railtie.rb