diff options
author | 2010-07-13 10:43:12 +0300 | |
---|---|---|
committer | 2010-07-29 19:49:16 +0200 | |
commit | 85927a805e76911b436a75533f94f5a451010c3f (patch) | |
tree | a937e5c99736ec1a3114cb366d7d3e2a4efaa937 | |
parent | Email questions (diff) | |
download | recruiting-webapp-85927a805e76911b436a75533f94f5a451010c3f.tar.gz recruiting-webapp-85927a805e76911b436a75533f94f5a451010c3f.tar.bz2 recruiting-webapp-85927a805e76911b436a75533f94f5a451010c3f.zip |
Add ability to receive emails through HTTP
./script/runner is a bit slow as it loads the Rails env each time and
it's also a bit of pain to setup permission wise for development.
-rw-r--r-- | app/controllers/users_controller.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 433386c..5903ce8 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -20,4 +20,12 @@ class UsersController < ApplicationController @user = this end end + + skip_before_filter :verify_authenticity_token, :only => [:receive_email] + + def receive_email + raise Hobo::PermissionDeniedError unless request.remote_ip == '127.0.0.1' + UserMailer.receive(params[:email]) + render :text => 'Email Received' + end end |