Class: EOTS::EOTSController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- EOTS::EOTSController
- Defined in:
- app/controllers/eots/eots_controller.rb
Instance Method Summary collapse
Instance Method Details
#send_email ⇒ Object
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 |
#show ⇒ Object
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 |