Sha256: 20ead986e0abeffb143db372197d3cad2d90ec14dad286312d91a38036310ed8
Contents?: true
Size: 695 Bytes
Versions: 4
Compression:
Stored size: 695 Bytes
Contents
module EOTS class EOTSController < ApplicationController include Rails.application.routes.url_helpers before_action :get_view_context def show # TODO: make this just get the KIND @kind = EOTS::find_kind(params[:kind]) render :show end 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 private def get_view_context @view_context = view_context end end end
Version data entries
4 entries across 4 versions & 1 rubygems