12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
# File 'lib/i18n_auto_scoping.rb', line 12
def self.included(mod)
mod.class_eval do
class << self
alias_method :i18n_auto_scoping_backend=, :backend=
def backend=(backend)
r = send(:i18n_auto_scoping_backend=, backend)
extend_backend_for_i18n_auto_scoping
r
end
def extend_backend_for_i18n_auto_scoping
if !backend.methods.include?('i18n_auto_scoping_translate')
backend.extend ::I18nAutoScoping::BackendExtension
end
end
end
end
end
|