Guest User

Untitled

a guest
Feb 21st, 2018
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. def sol1_create
  2. @reponse = Reponse.new(params[:reponse])
  3. @reponse.id_videos = "1"
  4. @reponse.id_candidats = session[:candidat]
  5. @reponse.save
  6.  
  7. @expert = Reponse.find(:all,:conditions => ['id_candidats = :id_candidats and id_videos = :id_videos', { :id_candidats => '1' , :id_videos => '1' }] )
  8. @expert.each { |l| @res_exec = l.execution }
  9. @diff = @res_exec - @reponse.execution
  10. @reponse.res_exec = @diff
  11. end
Add Comment
Please, Sign In to add comment