Sha256: eaf7befaaf54a165b526e0ec7ab0ec5711f53d9126e10e49d5d5cc0a42d72797
Contents?: true
Size: 746 Bytes
Versions: 10
Compression:
Stored size: 746 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 enginges without a locale soffix. 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
10 entries across 10 versions & 1 rubygems