app/views/admin/users/update.js.haml
- id = dom_id(@user)
- if @user.errors.empty?
$('##{id}').replaceWith('#{ j render(partial: "user", collection: [ @user ]) }')
$('##{id}').effect("highlight", { duration:1000 });
- else
$('##{id}').html('#{j render(partial: "edit") }')
$('#user_username').focus()