Sha256: 540be1f664399e5c1c220810335ff2fa9eafe0809c8047c50ee9b880210793d0
Contents?: true
Size: 354 Bytes
Versions: 2
Compression:
Stored size: 354 Bytes
Contents
module TrackChanges class CurrentUserFilter #:nodoc: def self.filter(controller) controller.send(:__track_changes_to_models).each do |model| instance = controller.instance_variable_get("@#{model}") return if instance.nil? instance.current_user = controller.send(:current_user) end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
track_changes-1.0.1 | lib/track_changes/current_user_filter.rb |
track_changes-1.0.0 | lib/track_changes/current_user_filter.rb |