[51049811] refine the with_assessment and without_assessment scopes in Candidate
delete the unused commented codes
add opening_id column to candidate model
fix some errors
Merge remote-tracking branch 'vmw-tmpst/master' into refine-scope
use first_or_create instead of redundant codes
Merge remote-tracking branch 'vmw-tmpst/master' into refine-scope

Conflicts:
	app/controllers/candidates_controller.rb
refine the candidate scope
for candidate scopes implemented by sql, replace them using AR pattern
fix failed spec
Merge remote-tracking branch 'vmw-tmpst/master' into refine-scope
fix opening's wrong scope definition based on latest db-schema

Signed-off-by: Henry Chen <hchen@vmware.com>
Fix more scope definition

Signed-off-by: Henry Chen <hchen@vmware.com>
fix spec based on recent scope change
Signed-off-by: Henry Chen <hchen@vmware.com>
refine one more scope

Signed-off-by: Henry Chen <hchen@vmware.com>
fix dashboard's interviews number doesn't match interviews listing page
Signed-off-by: Henry Chen <hchen@vmware.com>
Merge pull request #250 from whywhy36/refine-scope

[51049811] refine the scope methods in model classes.