Method: Mobility::Backends::Sequel::Column#read

Defined in:
lib/mobility/backends/sequel/column.rb

#read(locale, _options = nil) ⇒ Object

Gets the translated value for provided locale from configured backend.

Parameters:

  • locale (Symbol)

    Locale to read

Returns:

  • (Object)

    Value of translation



18
19
20
21
# File 'lib/mobility/backends/sequel/column.rb', line 18

def read(locale, _options = nil)
  column = column(locale)
  model[column] if model.columns.include?(column)
end