devict / devict.org

The amazing devict.org
https://devict.org
6 stars 27 forks source link

Code Challenges - Comment on Submissions #2

Closed jcbwlkr closed 11 years ago

jcbwlkr commented 11 years ago

It was requested that we add the ability to comment on submissions to code challenges.

MattConrad commented 11 years ago

I'll take this one.

MattConrad commented 11 years ago

Comments are displayed for submissions, on the listing page of submissions for each challenge, e.g. /challenges/2/submissions .

You can also add a new comment for a submission here. You can edit or delete comments you own.

There is some crude styling applied. It's not meant to be pretty or permanent. It's just there to make the different elements on the page visually distinct. It can be made nicer later (Bootstrap?).

I made submission_id attr_accesible in the comment model. This is perhaps non-standard for ROR, but in this case I think it doesn't open up any "extra" mischief that wasn't there already.

I didn't add comments for the Show action for an individual submission. I am not sure the Show action for an individual submission makes sense anyway--the user has drilled down to a specific challenge already, are they really going to drill deeper? Perhaps I should have removed that Show link on the submission listing, but didn't yet.