- Defined in:
Plugins allow modular customization of backends independent of the backend itself. They are enabled through theconfiguration setting, which takes an array of symbols corresponding to plugin names. The order of these names is important since it determines the order in which plugins will be applied.
So if our
Post, like this:
class Post translates :title, foo: true end
Foo plugin will be applied with the option value
true. Applying a module calls a class method,
apply (in this case
Foo.apply), which takes two arguments:
an instance of theclass,
attributes, from which the backend can configure the backend class (
attributes.backend_class) and the model (
attributes.model_class), and the
attributesmodule itself (which will be included into the backend).
the value of the
optionpassed into the model with
translates(in this case,
Typically, the plugin will include a module into either
attributes itself, configured according to the option value. For examples, see classes under the namespace.
Defined Under Namespace
Modules:, , , , , , , , Classes: , ,
Constant Summary collapse
- OPTION_UNSET =