Module: Mobility::Plugins::ActiveRecord::Dirty
- Extended by:
- Mobility::Plugin
- Defined in:
- lib/mobility/plugins/active_record/dirty.rb
Overview
Dirty tracking for AR models. See Mobility::Plugins::ActiveModel::Dirty for details on usage.
In addition to methods added by Mobility::Plugins::ActiveModel::Dirty, the AR::Dirty plugin adds support for the following persistence-specific methods (for a model with a translated attribute title
):
-
saved_change_to_title?
-
saved_change_to_title
-
title_before_last_save
-
will_save_change_to_title?
-
title_change_to_be_saved
-
title_in_database
The following methods are also patched to include translated attribute changes:
-
saved_changes
-
has_changes_to_save?
-
changes_to_save
-
changed_attribute_names_to_save
-
attributes_in_database
In addition, the following ActiveModel attribute handler methods are also patched to work with translated attributes:
-
saved_change_to_attribute?
-
saved_change_to_attribute
-
attribute_before_last_save
-
will_save_change_to_attribute?
-
attribute_change_to_be_saved
-
attribute_in_database
(When using these methods, you must pass the attribute name along with its locale suffix, so title_en
, title_pt_br
, etc.)
Defined Under Namespace
Modules: InstanceMethods
Method Summary
Methods included from Mobility::Plugin
configure, configure_default, default, dependencies, dependencies_satisfied?, included, included_hook, initialize_hook, requires