If your controller action looks like this:
respond_to do |format| format.html { raise \'Unsupported\' } format.js # index.js.erb end
and yo
Use code like this for parameters and user id, etc., notice that format option is in the same hash of other parameters like id and nested_attributes.
put :update, {id: record.id, nested_attributes: {id: 1, name: "John"}, format: :js}, user.id