Module: Mobility::Plugins::ActiveRecord

Extended by:
Mobility::Plugin
Defined in:
lib/mobility/plugins/active_record/query.rb,
lib/mobility/plugins/active_record.rb,
lib/mobility/plugins/active_record/cache.rb,
lib/mobility/plugins/active_record/dirty.rb,
lib/mobility/plugins/active_record/backend.rb,
lib/mobility/plugins/active_record/uniqueness_validation.rb

Overview

Adds a scope which enables querying on translated attributes using where and not as if they were normal attributes. Under the hood, this plugin uses the generic build_node and apply_scope methods implemented in each backend class to build ActiveRecord queries from Arel nodes. The plugin also adds find_by_<attribute> shortcuts for translated attributes.

The query scope applies to all translated attributes once the plugin has been enabled for any one attribute on the model.

Defined Under Namespace

Modules: Backend, Cache, Dirty, Query, UniquenessValidation Classes: MissingBackend

Method Summary

Methods included from Mobility::Plugin

configure, configure_default, default, dependencies, dependencies_satisfied?, included, included_hook, initialize_hook, requires