Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
8 lines (7 sloc) 247 Bytes
class StuffObserver < ActiveRecord::Observer
def after_save(stuff)
if stuff.location_id_changed?
LocationHistory.create(:stuff_id => stuff.id, :location => stuff.location, :datetime => Time.now, :user => stuff.user)
end
end
end
Something went wrong with that request. Please try again.