Module: TaggingControllerOverrides
- Defined in:
- lib/kete_translatable_content/extensions/tagging_controller_overrides.rb
Overview
for ITEM_CLASSES when new version is created to just add tags we want to update the version attribute of translations that matched previous version to new version number
Instance Method Summary collapse
-
#after_tags_added(options) ⇒ Object
method that add-ons can define to do something after tags added.
Instance Method Details
#after_tags_added(options) ⇒ Object
method that add-ons can define to do something after tags added
9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/kete_translatable_content/extensions/tagging_controller_overrides.rb', line 9 def () logger.debug("what are after_tags added options: " + .inspect) # get translations matching starting version translations = @item.class::Translation.all(@item.class.as_foreign_key_sym => @item.id, :version => [:starting_version].to_s) translations.each do |t| t.version = [:ending_version].to_s t.save! end end |