Sha256: 83360f0579da634e1d6b38cbd4f52d1bd7288a21046e3dd8aa47e6c316a7c916
Contents?: true
Size: 745 Bytes
Versions: 20
Compression:
Stored size: 745 Bytes
Contents
module Administrador module EngineRoutable # This prevents missing method error when using localized # engines. The localized gem fails to create a default route # name for engines without a locale suffix. For example if you # have an engine named blorgh, the router should be named blorgh. # With localized you get blorgh_en, blorgh_de and so on. This concern # provides the router method without the locale as suffix. module LocalizedConcern def method_missing(m, *args, &block) method_name_with_locale = "#{m}_#{I18n.locale}" if respond_to?(method_name_with_locale) send(method_name_with_locale, *args, &block) else super end end end end end
Version data entries
20 entries across 20 versions & 1 rubygems