Class: Teams::LookupsController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/jobshop/teams/lookups_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject



11
12
13
14
15
16
17
18
# File 'app/controllers/jobshop/teams/lookups_controller.rb', line 11

def create
  emails = params[:user][:email].split(",").map(&:strip).take(5)
  Jobshop::Team.grouped_by_email(emails).each_pair do |email, teams|
    Jobshop::TeamsMailer.found_teams(email, teams).deliver_later
  end

  redirect_to teams_lookup_path
end

#showObject



7
8
9
# File 'app/controllers/jobshop/teams/lookups_controller.rb', line 7

def show
  @lookup = Jobshop::User.new
end