Method: ActsAsList::InstanceMethods#decrement_position
- Defined in:
- lib/acts_as_list.rb
#decrement_position ⇒ Object
Decrease the position of this item without adjusting the rest of the list.
135 136 137 138 |
# File 'lib/acts_as_list.rb', line 135 def decrement_position return unless in_list? update_attribute position_column, self.send(position_column).to_i - 1 end |