Class: Mobility::Backends::ActiveRecord::PgHash
- Inherits:
-
Object
- Object
- Mobility::Backends::ActiveRecord::PgHash
- Includes:
- Mobility::Backends::ActiveRecord, HashValued
- Defined in:
- lib/mobility/backends/active_record/pg_hash.rb
Overview
Internal class used by ActiveRecord backends backed by a Postgres data type (hstore, jsonb).
Defined Under Namespace
Classes: Coder
Instance Method Summary collapse
-
#each_locale {|Locale| ... } ⇒ Object
Yields locales available for this attribute.
- #translations ⇒ Object
Methods included from HashValued
Methods included from Mobility::Backends::ActiveRecord
included, #setup_query_methods
Instance Method Details
#each_locale {|Locale| ... } ⇒ Object
Yields locales available for this attribute.
17 18 19 |
# File 'lib/mobility/backends/active_record/pg_hash.rb', line 17 def each_locale super { |l| yield l.to_sym } end |
#translations ⇒ Object
21 22 23 |
# File 'lib/mobility/backends/active_record/pg_hash.rb', line 21 def translations model.read_attribute(attribute) end |