Method: Cequel::Record::List#unshift
- Defined in:
- lib/cequel/record/collection.rb
#unshift(*objects) ⇒ List Also known as: prepend
Prepend one or more values to the beginning of this list
326 327 328 329 330 331 |
# File 'lib/cequel/record/collection.rb', line 326 def unshift(*objects) objects.map!(&method(:cast_element)) prepared = @model.class.connection.bug8733_version? ? objects.reverse : objects to_update { updater.list_prepend(column_name, prepared) } to_modify { super } end |