Add anonymous function to create.js.erb