Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
20 lines (17 sloc) 404 Bytes
module AbstractController
module Translation
def translate(*args)
key = args.first
if key.is_a?(String) && (key[0] == '.')
key = "#{ controller_path.gsub('/', '.') }.#{ action_name }#{ key }"
args[0] = key
end
I18n.translate(*args)
end
alias :t :translate
def localize(*args)
I18n.localize(*args)
end
alias :l :localize
end
end
Jump to Line
Something went wrong with that request. Please try again.