Module: Torque::PostgreSQL::I18n

Defined in:
lib/torque/postgresql/i18n.rb

Instance Method Summary collapse

Instance Method Details

#localize(locale, object, format = :default, options = {}) ⇒ Object

Adds extra suport to localize durations This is a temporary solution, since 3600.seconds does not translate into 1 hour



8
9
10
11
# File 'lib/torque/postgresql/i18n.rb', line 8

def localize(locale, object, format = :default, options = {})
  return super unless object.is_a?(ActiveSupport::Duration)
  object.inspect
end