Module: Recruiter::OauthProvidersHelper
- Defined in:
- app/helpers/recruiter/oauth_providers_helper.rb
Instance Method Summary collapse
- #available_oauth_providers ⇒ Object
- #provider_icon(provider) ⇒ Object
- #provider_icon_class(provider) ⇒ Object
Instance Method Details
#available_oauth_providers ⇒ Object
3 4 5 6 7 8 9 10 11 |
# File 'app/helpers/recruiter/oauth_providers_helper.rb', line 3 def available_oauth_providers { github: :github, google: :google_oauth2, facebook: :facebook, }.select do |key, provider| ENV["#{key.to_s.upcase}_KEY"] end end |
#provider_icon(provider) ⇒ Object
13 14 15 |
# File 'app/helpers/recruiter/oauth_providers_helper.rb', line 13 def provider_icon(provider) icon(provider_icon_class(provider)) end |
#provider_icon_class(provider) ⇒ Object
17 18 19 20 21 |
# File 'app/helpers/recruiter/oauth_providers_helper.rb', line 17 def provider_icon_class(provider) { google_oauth2: 'social-google-plus', }.fetch(provider.to_sym) { "social-#{provider}" } end |