Skip to content

Instantly share code, notes, and snippets.

@LaurMo
Created September 24, 2013 16:42
Show Gist options
  • Save LaurMo/6687558 to your computer and use it in GitHub Desktop.
Save LaurMo/6687558 to your computer and use it in GitHub Desktop.
json call for mailer
def email
content = Content.find(params[:id])
ClientMailer.content_send(current_user, content, params[:client_email], params[:client_note]).deliver
if ClientMailer.deliver
render :json => { :status => sent }
else
render :json => { :errors => errors.full_messages }, :status => 401
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment