Module: TrackChanges
- Defined in:
- lib/track_changes.rb,
lib/track_changes/model.rb,
lib/track_changes/engine.rb,
lib/track_changes/version.rb,
lib/track_changes/controller.rb,
app/models/track_changes/diff.rb,
lib/track_changes/attribution.rb,
app/models/track_changes/snapshot.rb,
app/helpers/track_changes/diff_helper.rb
Defined Under Namespace
Modules: Controller, DiffHelper, Model Classes: Diff, Engine, Snapshot
Constant Summary collapse
- VERSION =
"0.1.2"
Class Method Summary collapse
-
.with_changes_attributed_to(new_source, &block) ⇒ Object
Set the source used for implict changes_by attribution for the duration of the block.
Class Method Details
.with_changes_attributed_to(new_source, &block) ⇒ Object
Set the source used for implict changes_by attribution for the duration of the block
6 7 8 9 10 11 12 |
# File 'lib/track_changes/attribution.rb', line 6 def self.with_changes_attributed_to(new_source, &block) old_source = self.default_attribution self.default_attribution = new_source block.call ensure self.default_attribution = old_source end |