Sha256: 7f4a0bf1b455cc898ebe4415d9c6694616b6c346c55180299394d03b99fa9be4
Contents?: true
Size: 419 Bytes
Versions: 23
Compression:
Stored size: 419 Bytes
Contents
module Torque module PostgreSQL module I18n # Adds extra suport to localize durations # This is a temporary solution, since 3600.seconds do not translate into # 1 hour def localize(locale, object, format = :default, options = {}) return super unless object.is_a?(ActiveSupport::Duration) object.inspect end end ::I18n::Backend::Base.prepend I18n end end
Version data entries
23 entries across 23 versions & 1 rubygems
Version | Path |
---|---|
torque-postgresql-0.1.3 | lib/torque/postgresql/i18n.rb |
torque-postgresql-0.1.2 | lib/torque/postgresql/i18n.rb |
torque-postgresql-0.1.1 | lib/torque/postgresql/i18n.rb |