Hi
    I am calling the following from the problem controller
@problem=Problem.find(params[:id])
MailSendingProblem.send_mail_to_group_owner(group_id.to_i,@problem)  and
inside the def send_mail_to_group_owner

ProblemMailer.deliver_to_send_mail_to_user(user.name,pemailaddress.email,problem)

     Now in the view to_send_mail_to_user.rhtml I have
   Number : <%= @problem.number%>
   Title  :  <%= @problem.title%>
   Urgency : <%=h ProblemUrgency.find(@problem.problem_urgency_id).name
if [EMAIL PROTECTED]>

   Priority : <%=h
ProblemPriority.find(@problem.problem_priority_id).name if
[EMAIL PROTECTED]>

       I have heard about collection but not yet used.What I am asking
is  that in the above Urgency and priority from the view the db is
queried directly..So can i avoid this and pass the data as collections
(I dont know I am right) from controller and access it in view so that
avoid direct querying of datbase from view ? Or if I conntinue with the
above is it wrong?

Thanks in advance
Sijo
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" 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/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to