method
toggle
v4.0.2 -
Show latest stable
- Class:
ActiveRecord::Persistence
toggle(attribute)public
Assigns to attribute the boolean opposite of attribute?. So if the predicate returns true the attribute will become false. This method toggles directly the underlying value without calling any setter. Returns self.