akshatpradhan/compliance-chimp — pull request #165 by adamico (2014-05-18 11:48:43+00:00)
Title: xeditable: proof.note, filepicker+aviary: image

This PR is quite long and not completed.

The x-editable for editing a proof.note is done.
The filepicker + aviary to edit uploaded screenshot is not implemented yet.

Working on this allowed me to do a lot of refactoring and simplify views.
I have reached a point in code abstraction where I finally found out how to
simplify the user - proof - requirement relationship.

This commit diff shows the huge refactoring and the simplified code which is
the result of the hard work.

Summary of refactoring:

- workflow is accessible at /checklist url
- requirement resource has been reduced to the minimum: it's basically a
dictionary for the proof resource.
- proof resource is the new hero (we should have done this from the start)
- user.proofs for each requirement are instantiated at user creation (with a
check for inexistant proofs at user sign in for legacy users)
- proof#index lists proofs grouped by requirement parent (1, 2, ... A)
- ProofsController gets all the functions of the RequirementsController: index,
update
- PDF report generation has been fixed to work with user.proofs
- all those messy methods 'requirement.proof_for(user)' and similar are gone,
proof instance gets the importance which deserved from the start
- specs are failing for the moment (I'll fix them)
- some more refactoring is needed (the progress_bar generation is messy)