app/controllers/organizations_controller.rb
# Check if the current user has any organizations with admin privilege,
# if so add the user to the corresponding classroom automatically.
Check if the current user has any organizations with admin privilege,
if so add the user to the corresponding classroom automatically.
Check if the current user has any organizations with admin privilege if so add the user to the corresponding classroom automatically .
def add_current_user_to_organizations
    @users_github_organizations.each do |organization|
      classroom = organization[:classroom]
      if classroom.present? && !classroom.users.include?(current_user)
        create_user_organization_access(classroom)
      end
    end
  end
def add_current_user_to_organizations @users_github_organizations . each do | organization | classroom = organization [ :classroom ] if classroom . present? && ! classroom . users . include? ( current_user ) create_user_organization_access ( classroom ) end end end
Check if the current user has any organizations with admin privilege,
if so add the user to the corresponding classroom automatically.
Check if the current user has any organizations with admin privilege if so add the user to the corresponding classroom automatically .