Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete/Update #35

Closed
benhill opened this issue Aug 15, 2018 · 3 comments
Closed

Delete/Update #35

benhill opened this issue Aug 15, 2018 · 3 comments

Comments

@benhill
Copy link

benhill commented Aug 15, 2018

Hello! Thank you for this gem.

Question on DNS record delete syntax...

Tried several options, including this:

zone.dns_records.delete("name" => "ftp", :content_type => "application/json")

And I receive "Method DELETE not available for that URI."

Possible I am doing something obviously wrong.

@ioquatix
Copy link
Member

Hmmm, I've never had to do that before. Can you check the API documentation and see what the correct method is?

@chainum
Copy link

chainum commented Aug 16, 2018

It's supposed to be invoked like this:

zone.dns_records.find_by_name("ftp.domain.com").delete

Or delete the record by its id:

zone.dns_records.find_by_id("dns_record_id").delete

Or delete all dns records for a zone:

zone.dns_records.all.each(&:delete)

@ioquatix
Copy link
Member

Thanks! I will add some specs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants