Created
June 4, 2013 17:55
-
-
Save v-fedorov/5708020 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
update: (e, ui) -> | |
item_id = ui.item.data('item_id') | |
position = ui.item.index() | |
$.ajax( | |
type: 'POST' | |
url: $(this).data('update_url') | |
dataType: 'json' | |
# the :thing hash gets passed to @thing.attributes | |
# row_order is the default column name expected in ranked-model | |
data: { id: item_id, thing: { row_order_position: position } } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment