prototype = respond_to?(:singleton_class) ? :singleton_class : :metaclass

ActiveRecord::Base.send :define_method, :touch_gently do
  self.updated_at = Time.now
  send(:update_without_callbacks)
end

ActiveRecord::Base.send(prototype).send :define_method, :touch_all_gently do
  update_all(:updated_at => Time.now)
end
