Class: Mobility::Backends::Sequel::Jsonb
- Inherits:
-
PgHash
- Object
- PgHash
- Mobility::Backends::Sequel::Jsonb
- Defined in:
- lib/mobility/backends/sequel/jsonb.rb
Defined Under Namespace
Classes: JSONBOp
Class Method Summary collapse
Instance Method Summary collapse
-
#read(locale, **options) ⇒ String, ...
Value of translation.
-
#write(locale, value, **options) ⇒ String, ...
Updated value.
Methods included from Mobility::Backends::Sequel
Class Method Details
.build_op(attr, locale) ⇒ Mobility::Backends::Sequel::Jsonb::JSONBOp
38 39 40 41 |
# File 'lib/mobility/backends/sequel/jsonb.rb', line 38 def self.build_op(attr, locale) column_name = column_affix % attr JSONBOp.new(column_name.to_sym).get_text(locale.to_s) end |
Instance Method Details
#read(locale, **options) ⇒ String, ...
Note:
Translation may be string, integer or boolean-valued since value is stored on a JSON hash.
Returns Value of translation.
|
# File 'lib/mobility/backends/sequel/jsonb.rb', line 17
|
#write(locale, value, **options) ⇒ String, ...
Note:
Translation may be string, integer or boolean-valued since value is stored on a JSON hash.
Returns Updated value.
|
# File 'lib/mobility/backends/sequel/jsonb.rb', line 17
|