<commit_before># Controller for dealing with teams and team's students' skills.
class TeamController < ApplicationController
  before_filter :set_user, :set_team
  before_filter :set_permissions
  before_filter :check_approved, :only => ['submit', 'unsubmit', 'edit']

  def email
    @team = Team.find_by_id(params[:id])
    render "email"
  end


  def do_email
    @team = Team.find_by_id(params[:id])
    reply_to = @user.email
    to = @team.users.map {|user| user.email }.compact
    subject = params[:subject]
    body = params[:body]
    TeamMailer.email_team(to, subject, body, reply_to).deliver_now
    redirect_to teams_path<commit_msg>Fix more style issues<commit_after># Controller for dealing with teams and team's students' skills.
class TeamController < ApplicationController
  before_filter :set_user, :set_team
  before_filter :set_permissions
  before_filter :check_approved, :only => ['submit', 'unsubmit', 'edit']

  def email
    @team = Team.find_by_id(params[:id])
    render 'email'
  end

  def do_email
    @team = Team.find_by_id(params[:id])
    reply_to = @user.email
    to = @team.users.map(&:email).compact
    subject = params[:subject]
    body = params[:body]
    TeamMailer.email_team(to, subject, body, reply_to).deliver_now
    redirect_to teams_path
{'fraction_non_alphanumeric': 0.11249030256012413, 'fraction_numerical': 0.0, 'mean_word_length': 4.397489539748954, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '649870', 'n_tokens_mistral': 422, 'n_tokens_neox': 410, 'n_words': 103}