Created
April 2, 2010 02:06
-
-
Save xenda/352649 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if request.headers["Authorization"] != "ab5fb24039ba11df98790800200c9a66" | |
return head(:unauthorized) | |
end | |
email = params[:email] | |
subject = email[:subject] | |
sender = email[:sender] | |
to = email[:to] | |
raw = email[:raw] | |
# Creating a new tracking in PivotalTracker | |
story = Story.create(:name => subject, :requested_by => "Alvaro Pereyra" , :description => "#{subject} \n #{raw}" , :project_id => 70807) | |
# We get the code | |
code = story.id | |
# We get the issue's url | |
pivotal_issue_url = story.url | |
# We inform our client that his requests is being taken care of | |
IssueMailer.issue_received(sender,to,subject,code).deliver | |
#We inform the proper parties | |
IssueMailer.issue_receive(sender, subject, code, pivotal_issue_url).deliver | |
head :ok | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment