Class: Mobility::Backend::ActiveRecord::Hstore
- Inherits:
-
HashValued
- Object
- HashValued
- Mobility::Backend::ActiveRecord::Hstore
- Defined in:
- lib/mobility/backend/active_record/hstore.rb
Overview
Implements the Hstore backend for ActiveRecord models.
Defined Under Namespace
Classes: QueryMethods
Instance Attribute Summary
Attributes included from Mobility::Backend
Backend Accessors collapse
-
#read(locale, **options) ⇒ Object
Value of translation.
-
#write(locale, value, **options) ⇒ Object
Updated value.
Methods inherited from HashValued
#translations, #write_to_cache?
Methods included from Mobility::Backend
included, #initialize, method_name
Instance Method Details
#read(locale, **options) ⇒ Object
Returns Value of translation.
|
# File 'lib/mobility/backend/active_record/hstore.rb', line 15
|
#write(locale, value, **options) ⇒ Object
Returns Updated value.
21 22 23 |
# File 'lib/mobility/backend/active_record/hstore.rb', line 21 def write(locale, value, **) translations[locale] = value && value.to_s end |