Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module ApplicationHelper
- def current_user
- if current_freelancer
- return current_freelancer
- elsif current_employer
- return current_employer
- elsif current_admin
- return current_admin
- else
- return nil
- end
- end
- def current_user_model
- current_user_class = current_user.class.to_s
- return current_user_class.downcase.pluralize
- end
- end
Add Comment
Please, Sign In to add comment