Skip to content

Instantly share code, notes, and snippets.

@matiasleidemer
Created April 16, 2012 19:54
Show Gist options
  • Save matiasleidemer/2401076 to your computer and use it in GitHub Desktop.
Save matiasleidemer/2401076 to your computer and use it in GitHub Desktop.
# encoding: UTF-8
class EmailsController < ApplicationController
def plano
@plano = Plano.find(params[:plan_id], include: [:assistencias])
Notifier.plano(params[:recipients], @plano).deliver!
render json: "Email sent successfully", status: :ok
rescue => e
render json: e.message, status: :bad_request
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment