Flowdock
method

no_touching

Importance_1
v5.2.3 - Show latest stable - 0 notes - Class: ClassMethods
no_touching(&block) public

Lets you selectively disable calls to touch for the duration of a block.

Examples

ActiveRecord::Base.no_touching do
  Project.first.touch  # does nothing
  Message.first.touch  # does nothing
end

Project.no_touching do
  Project.first.touch  # does nothing
  Message.first.touch  # works, but does not touch the associated project
end
Show source
Register or log in to add new notes.