Class: EOTS::EOTSController

Inherits:
ApplicationController show all
Defined in:
app/controllers/eots/eots_controller.rb

Instance Method Summary collapse

Instance Method Details

#send_emailObject



15
16
17
18
19
20
21
22
23
# File 'app/controllers/eots/eots_controller.rb', line 15

def send_email
  @email, errs = EOTS::Email.create_from_params(params)
  if errs && errs.any?
    flash.now[:alert] = errs.join("\n")
    redirect_to request.url, request.params
  end
  EOTS::Mailer.email(@email).deliver_now
  redirect_to root_path, notice: 'Your email has been sent'
end

#showObject



9
10
11
12
13
# File 'app/controllers/eots/eots_controller.rb', line 9

def show
  # TODO: make this just get the KIND
  @kind = EOTS::find_kind(params[:kind])
  render :show
end