caseyli/capo — comment on commit f9452134d84feb7eb8dd28bbb272be2758ea3f48
File: app/controllers/open_mics_controller.rb line 74
By jduff:

Instead of doing these checks and having a custom response format I would have `add_attendee` handle the `include?` check and add errors onto the `@open_mic` object. That way you can just `respond_with(@open_mic)` in all cases. You can customize the `to_json` method for `@open_mic` to include the `attendee_count` as well.