Sha256: 923462765001966777892abc7bc42c56565e901921876f552e6cb96680f5ac73
Contents?: true
Size: 559 Bytes
Versions: 27
Compression:
Stored size: 559 Bytes
Contents
module WillPaginate module I18n def self.locale_dir File.expand_path('../locale', __FILE__) end def self.load_path Dir["#{locale_dir}/*.{rb,yml}"] end def will_paginate_translate(keys, options = {}) if defined? ::I18n defaults = Array(keys).dup defaults << Proc.new if block_given? ::I18n.translate(defaults.shift, options.merge(:default => defaults, :scope => :will_paginate)) else key = Array === keys ? keys.first : keys yield key, options end end end end
Version data entries
27 entries across 27 versions & 4 rubygems