Skip to content

Instantly share code, notes, and snippets.

@coderforhire
Created January 31, 2012 19:39
Show Gist options
  • Save coderforhire/1712474 to your computer and use it in GitHub Desktop.
Save coderforhire/1712474 to your computer and use it in GitHub Desktop.
def create
@ticket = Ticket.new(params[:ticket])
@user = User.find(params[:user_id])
@ticket.save
NotifyMailer.notify_email(@user).deliver
flash[:notice] = "Thanks for submitting your ticket!"
redirect_to tickets_open_path
end
@coderforhire
Copy link
Author

Request

Parameters:

{"utf8"=>"✓",
"authenticity_token"=>"aUD3S3gud6SDMxycSTMWqEz3i4/2rN/qrODQ3i9d27c=",
"ticket"=>{"email"=>"afresta@gmail.com",
"subject"=>"Audio",
"client_id"=>"1",
"branch_id"=>"",
"body"=>"asdfasdf",
"user_id"=>"1"},
"commit"=>"Create Ticket"}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment