Hello everyone.

I send an email after_create the ticket. But i can get the ticket url
in the email to access the ticket created.

I get some other id but in the log file it generate the correct id,
but just before sent the email

Hehe is my after_create in the ticket model:

after_create {TicketMailer.deliver_normal(self, @ticket)}

And my normal.erb file have this url:

<%= ticket_url :host => @host, :id => id %>

But i don´t get the id i want.

And the log file says:
Sent mail to [email protected]

Date: Wed, 2 Mar 2011 10:00:36 -0100

From: [email protected]

To: [email protected]

Subject: NOC System - Novo ticket criado

Mime-Version: 1.0

Content-Type: text/plain; charset=utf-8



Novo ticket!

Verificar através do link:

http://localhost:3000/tickets/136140060     => (this is the id i don´t
need)


Obrigado,

Team.
Redirected to http://localhost:3000/tickets/115  => (this is the id i
need), but it's redirected after the email is sent.
Completed in 4770ms (DB: 412) | 302 Found [http://localhost/tickets]


I need to get that second dynamic id, because thas the id for the
ticket thas has been created.


If someone could give me some tipos i'll appreciate so much.

Thanks in advance.

Best Regards to all,

Edson Teixeira

-- 
You received this message because you are subscribed to the Google Groups "Hobo 
Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/hobousers?hl=en.

Reply via email to