Module: RouteTranslator

Defined in:
lib/route_translator.rb,
lib/route_translator/railtie.rb,
lib/route_translator/version.rb,
lib/route_translator/route_set.rb,
lib/route_translator/route_set/helpers.rb,
lib/route_translator/route_set/translator.rb,
lib/route_translator/route_set/dictionary_management.rb

Defined Under Namespace

Modules: Controller, Mapper, RouteSet Classes: Configuration, Railtie

Constant Summary collapse

TRANSLATABLE_SEGMENT =
/^([-_a-zA-Z0-9]+)(\()?/.freeze
LOCALE_PARAM_KEY =
:locale
ROUTE_HELPER_CONTAINER =
[
  ActionController::Base,
  ActionView::Base,
  ActionMailer::Base,
  ActionDispatch::Routing::UrlFor
].freeze
VERSION =
'2.0.1'

Class Method Summary collapse

Class Method Details

.configObject



27
28
29
# File 'lib/route_translator.rb', line 27

def self.config
  @config ||= Configuration.new
end

.locale_suffix(locale) ⇒ Object



23
24
25
# File 'lib/route_translator.rb', line 23

def self.locale_suffix locale
  locale.to_s.underscore
end