Problem with mailer.rb
Added by Marco Antonio Suárez Peña over 14 years ago
Hi there!
That is my first post in this forum! I'm glad to write here!
First of all: Thank you! This is a wonderful application. Thanks to all the people that have made this real :)
Well, I'm sure that my problem is a piece of cake for all the people that knows about Ruby.
I would like to change the mail subject to include priority of the issue.
As far as i know, priority references to a table (enumerations) and to field (name) (That is the value that I want to show in the subject)
At line 46 is coded:
subject "[#{issue.project.name} - #{issue.tracker.name} ##{issue.id}] #{issue.subject}"
and changed to:
subject "[#{issue.project.name} - #{issue.tracker.name} ##{issue.id} - #{issue.enumeration.name}] #{issue.subject}"
but it doesn't work...
Could someone tell me what is the way to fix this?
Thanks in advance!
Replies (2)
RE: Problem with mailer.rb - Added by Felix Schäfer over 14 years ago
Marco Antonio Suárez Peña wrote:
As far as i know, priority references to a table (enumerations) and to field (name) (That is the value that I want to show in the subject)
Not quite. The priorities are stored in a table name enumerations
and inherit from the Enumeration
class, but they are first class objects through STI (single-table-inheritance, google that with rails for more details).
Could someone tell me what is the way to fix this?
issue.priority.name
should work.
RE: Problem with mailer.rb - Added by Marco Antonio Suárez Peña over 14 years ago
It works!
Thanks for your quick response Felix!