Module: Mobility::Backends::ActiveRecord::ClassMethods
- Defined in:
- lib/mobility/backends/active_record.rb
Instance Method Summary collapse
- #[](name, locale) ⇒ Object
-
#apply_scope(relation, _predicate, _locale = Mobility.locale, invert: false) ⇒ ActiveRecord::Relation
Relation with scope added.
-
#build_node(_attr, _locale) ⇒ Object
Arel node for this translated attribute.
Instance Method Details
#[](name, locale) ⇒ Object
16 17 18 |
# File 'lib/mobility/backends/active_record.rb', line 16 def [](name, locale) build_node(name.to_s, locale) end |
#apply_scope(relation, _predicate, _locale = Mobility.locale, invert: false) ⇒ ActiveRecord::Relation
Returns Relation with scope added.
32 33 34 |
# File 'lib/mobility/backends/active_record.rb', line 32 def apply_scope(relation, _predicate, _locale = Mobility.locale, invert: false) relation end |
#build_node(_attr, _locale) ⇒ Object
Returns Arel node for this translated attribute.
23 24 25 |
# File 'lib/mobility/backends/active_record.rb', line 23 def build_node(_attr, _locale) raise NotImplementedError end |