Module: Mobility::Plugins::ActiveRecord

Defined in:
lib/mobility/plugins/active_record/query.rb,
lib/mobility/plugins/active_record.rb,
lib/mobility/plugins/active_record/dirty.rb,
lib/mobility/plugins/active_record/attribute_methods.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: Dirty, Query, TranslatedAttributes Classes: AttributeMethods