Guest User

Untitled

a guest
Jun 22nd, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. def latest_workshop_completion workshop_id
  2. @questionnaire = WorkshopRkaQuestionnaire.find(params[:workshop_rka_questionnaire_id], :order => "created_at DESC")
  3. @questionnaire.rka_completions.find_by_stay_id(self.id, :order => "created_at DESC")
  4. end
  5.  
  6. def latest_technical_completion
  7. @questionnaire = TechnicalRkaQuestionnaire.first(:order => "created_at DESC")
  8. @questionnaire.rka_completions.find_by_stay_id(self.id, :order => "created_at DESC")
  9. end
  10.  
  11. def latest_social_completion
  12. @questionnaire = SocialRkaQuestionnaire.first(:order => "created_at DESC")
  13. @questionnaire.rka_completions.find_by_stay_id(self.id, :order => "created_at DESC")
  14. # [@completion, ]
  15. end
  16.  
  17. def get_latest_type_rka_completion object, options=nil
  18. ...
  19. end
Add Comment
Please, Sign In to add comment