Module: ActionDispatch::Routing::Translator
- Defined in:
- lib/route_translator.rb
Class Method Summary collapse
Class Method Details
.i18n(*locales) ⇒ Object
280 281 282 |
# File 'lib/route_translator.rb', line 280 def i18n *locales RouteTranslator.init_with_i18n(*locales).translate Rails.application.routes end |
.translate(&block) ⇒ Object
271 272 273 |
# File 'lib/route_translator.rb', line 271 def translate &block RouteTranslator.init_with_yield(&block).translate Rails.application.routes end |
.translate_from_file(*file_path) ⇒ Object
275 276 277 278 |
# File 'lib/route_translator.rb', line 275 def translate_from_file *file_path file_path = %w(config locales routes.yml) if file_path.blank? RouteTranslator.init_from_file(File.join(Rails.root, *file_path)).translate Rails.application.routes end |