Module: Mongoid::Orderable::Mixins::Movable
- Defined in:
- lib/mongoid/orderable/mixins/movable.rb
Instance Method Summary collapse
- #move_to(target_position, options = {}) ⇒ Object (also: #insert_at)
- #move_to!(target_position, options = {}) ⇒ Object (also: #insert_at!)
- #move_to=(target_position, options = {}) ⇒ Object (also: #insert_at=)
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, = {}) move_field_to target_position, 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, = {}) move_field_to target_position, 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, = {}) move_field_to target_position, end |