Skip to content
Browse files

update the set_cookie calls

  • Loading branch information...
1 parent ed05b42 commit 43832875d260ca57ff5ed409220fb3ac231c14ea @timriley committed Mar 31, 2009
Showing with 5 additions and 5 deletions.
  1. +2 −2 TODO
  2. +3 −3 unfuddle_helpdesk.rb
View
4 TODO
@@ -1,7 +1,5 @@
- show the created_at timestamp in the ticket show page.
-- namespace the form params so we can do Comment.create(params[:comment])
-
- email notification when ticket is submitted
- redirect user straight to ticket's page when ticket is suvmitted?
@@ -42,3 +40,5 @@ DONE
- provide a way for people to submit comments for a ticket
- comments will need to have the submitted name at the front of the body, separated by a delimiter, just like the tickets.
+
+- namespace the form params so we can do Comment.create(params[:comment])
View
6 unfuddle_helpdesk.rb
@@ -108,8 +108,8 @@ def out_of_bounds?(t)
end
post '/tickets' do
- set_cookie('name', {:path => '/', :expires => Time.now + 60*60*24*365, :value => params[:ticket][:name]})
- set_cookie('component_id', {:path => '/', :expires => Time.now + 60*60*24*365, :value => params[:ticket][:component_id]})
+ response.set_cookie('name', {:path => '/', :expires => Time.now + 60*60*24*365, :value => params[:ticket][:name]})
+ response.set_cookie('component_id', {:path => '/', :expires => Time.now + 60*60*24*365, :value => params[:ticket][:component_id]})
flash[:notice] = Ticket.create(params[:ticket]).created? ? 'ticket_success' : 'ticket_error'
redirect '/'
@@ -121,7 +121,7 @@ def out_of_bounds?(t)
end
post '/tickets/:id/comments' do
- set_cookie('name', {:path => '/', :expires => Time.now + 60*60*24*365, :value => params[:comment][:name]})
+ response.set_cookie('name', {:path => '/', :expires => Time.now + 60*60*24*365, :value => params[:comment][:name]})
flash[:notice] = Comment.create(params[:comment]).created? ? 'comment_success' : 'comment_error'
redirect "/tickets/#{params[:id]}"

0 comments on commit 4383287

Please sign in to comment.
Something went wrong with that request. Please try again.