Module: SingleTableGlobalize3::Versioning::PaperTrail
- Defined in:
- lib/single_table_globalize3/versioning/paper_trail.rb
Instance Method Summary collapse
Instance Method Details
#previous_version ⇒ Object
end
12 13 14 15 |
# File 'lib/single_table_globalize3/versioning/paper_trail.rb', line 12 def previous_version preceding_version = source_version ? source_version.previous : send(self.class.versions_association_name).for_this_locale.last preceding_version.reify if preceding_version end |
#source_version ⇒ Object
17 18 19 20 |
# File 'lib/single_table_globalize3/versioning/paper_trail.rb', line 17 def source_version version = send(self.class.version_association_name) return version if version.try(:locale) == SingleTableGlobalize3.locale.to_s end |