lib/multiauth/views_helper.rb in multiauth-0.0.3 vs lib/multiauth/views_helper.rb in multiauth-0.1.0

- old
+ new

@@ -11,9 +11,22 @@ def multiauth_assets javascript_include_tag('multiauth')+ stylesheet_link_tag('multiauth') end + + def multiauth_providers + providers = Multiauth::PROVIDERS + if !devise_mapping.oauthable? + providers.delete("Facebook") + providers.delete("Github") + else + providers.delete("Facebook") if !resource_class.oauth_providers.include?(:facebook) + providers.delete("Github") if !resource_class.oauth_providers.include?(:github) + end + + providers + end end end ::ActionView::Base.send :include, Multiauth::ViewsHelper