philipmuir/powerdns-on-rails — pull request #3 by philipmuir (2013-01-31 02:55:05+00:00)
Title: Added respond_to block to update_soa method.

Should fix the method throwing 500 Internal Server Errors on json requests:

Started PUT "/domains/3/records/17/update_soa" for 127.0.0.1 at 2013-01-31 13:45:40 +1100
Processing by RecordsController#update_soa as JSON
Parameters: {"soa"=>{"primary_ns"=>"ns1.syd1b.bigcommerce.net", "contact"=>"serverops.interspire.com.", "refresh"=>10804, "retry"=>1337, "expire"=>604809, "minimum"=>10800}, "domain_id"=>"3", "id"=>"17"}

...sql statements....

Completed 500 Internal Server Error in 2152ms

ArgumentError (too few arguments):
app/controllers/records_controller.rb:88:in `format'
app/controllers/records_controller.rb:88:in `update_soa'

Rendered _trace.erb (2.1ms)
Rendered _request_and_response.erb (40.0ms)
Rendered diagnostics.erb within rescues/layout (106.1ms)