Guest User

Untitled

a guest
Oct 20th, 2017
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. class HomeController < ApplicationController
  2.  
  3. def index
  4. debugger
  5. if current_user
  6. if current_user.role?(:respondent)
  7. @questionnaires = Questionnaire.authorized_questionnaires(current_user)
  8. elsif current_user.role?(:delegate)
  9. redirect_to dashboard_delegate_path(current_user.id)
  10. end
  11. else
  12. @user_session = UserSession.new
  13. end
  14. end
  15. end
Add Comment
Please, Sign In to add comment