OSDN Git Service

API: extracted helper method to provide 400 bad request error with description
authorSebastian Ziebell <sebastian.ziebell@asquera.de>
Wed, 13 Feb 2013 14:48:52 +0000 (15:48 +0100)
committerSebastian Ziebell <sebastian.ziebell@asquera.de>
Wed, 13 Feb 2013 14:48:52 +0000 (15:48 +0100)
commit6fc3263e15b71830e6f1b2a66891da5f4c055137
treef46179ab65e682b260ab3ce09a83ce1d3988b153
parent54ab9bb6df3a2cd9f9384aebae07e0b18acee10b
API: extracted helper method to provide 400 bad request error with description

Extracted a method for 400 error (Bad request) and adjusted code accordingly. The name of
the missing attribute is used to show which one was missing from the request. It is used to
give an appropriate message in the json response.
lib/api/helpers.rb
lib/api/merge_requests.rb
lib/api/milestones.rb
lib/api/notes.rb
lib/api/projects.rb
spec/requests/api/merge_requests_spec.rb