profile_helper.rb 361 Bytes
Newer Older
1
module ProfileHelper
2
  def oauth_active_class(provider)
3
    if current_user.identities.exists?(provider: provider.to_s)
4 5 6
      'active'
    end
  end
7 8 9 10 11 12

  def show_profile_username_tab?
    current_user.can_change_username?
  end

  def show_profile_social_tab?
13
    enabled_social_providers.any?
14 15 16
  end

  def show_profile_remove_tab?
17
    signup_enabled?
18
  end
19
end