@ -3,8 +3,7 @@ class RbImpedimentsController < RbApplicationController
def create
@impediment = Impediment.create_with_relationships(params, @project.id)
result = @impediment.errors.length
status = (result == 0 ? 200 : 400)
status = (@impediment.errors.empty? ? 200 : 400)
@include_meta = true
respond_to do |format|
@ -4,7 +4,7 @@ class RbTasksController < RbApplicationController
@task = Task.create_with_relationships(params, @project.id)
status = (@task.errors.none? ? 200 : 400)
status = (@task.errors.empty? ? 200 : 400)