Module: Mobility::Plugins::FallthroughAccessors

Extended by:
Mobility::Plugin
Defined in:
lib/mobility/plugins/fallthrough_accessors.rb

Overview

Defines method_missing and respond_to_missing? methods for a set of attributes such that a method call using a locale accessor, like:

article.title_pt_br

will return the value of article.title with the locale set to pt-BR around the method call. The class is called “FallthroughAccessors” because when included in a model class, locale-specific methods will be available even if not explicitly defined with the locale_accessors option.

This is a less efficient (but more open-ended) implementation of locale accessors, for use in cases where the locales to be used are not known when the model class is generated.

Method Summary

Methods included from Mobility::Plugin

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