Module: Mongoid::Orderable::Mixins::Movable

Defined in:
lib/mongoid/orderable/mixins/movable.rb

Instance Method Summary collapse

Instance Method Details

#move_to(target_position, options = {}) ⇒ Object Also known as: insert_at



13
14
15
# File 'lib/mongoid/orderable/mixins/movable.rb', line 13

def move_to(target_position, options = {})
  move_field_to target_position, options
end

#move_to!(target_position, options = {}) ⇒ Object Also known as: insert_at!



7
8
9
10
# File 'lib/mongoid/orderable/mixins/movable.rb', line 7

def move_to!(target_position, options = {})
  move_field_to target_position, options
  save
end

#move_to=(target_position, options = {}) ⇒ Object Also known as: insert_at=



18
19
20
# File 'lib/mongoid/orderable/mixins/movable.rb', line 18

def move_to=(target_position, options = {})
  move_field_to target_position, options
end