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



10
11
12
13
# File 'lib/torque/postgresql/i18n.rb', line 10

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