Hello All: I want to apply a layout to all the mails going from my application. I created a layout tempalte file named mail.rhtml in the ''layout'' directory. Now where should i specify the layout details to incorporate them in mail and how? TIA, Priya Saini -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Hi Priya In the controller you have to specify at the top like "layout "mail"" -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Abhi Manyu wrote:> Hi Priya > In the controller you have to specify at the top like "layout "mail""Dear Abhi: Thanks for ur reply.. I tried it .. bt didnt work.. I mean the mail was all the same.. Also writing it on top of the controller will apply this to all the actions. but i want it just for a specific action.. Regards, Priya -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Hi Check this http://wiki.rubyonrails.org/rails/pages/HowtoWrapViewsWithLayouts check partial layouts if it helped let me know -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Abhi Manyu wrote:> Hi > > Check this > > http://wiki.rubyonrails.org/rails/pages/HowtoWrapViewsWithLayouts check > partial layouts > > if it helped let me knowHi Abhi: No.. didnt get any help from the source,.. I hope im able to clearly explain you my issue... Regards, Priya -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Hi there in the link there is a section called partial layout . using that we can implement differebnt layout for some views I think -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Abhi Manyu wrote:> Hi > > there in the link there is a section called partial layout . using that > we can implement differebnt layout for some views I thinkAbhi: Different layouts is not the need.. What i need is... Applying the layout should be reflected in the sent mail.. I know how to apply layouts in general.. but now i want it specific to ''send mail'' action. Priya -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
if you want to apply a layout for a specific action you can do like this in the controller say layout => ''main_layout'', :except => ''your_action'' in the action say render :layout => ''mail_layout'' On 10/29/07, Priya Saini <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > > Abhi Manyu wrote: > > Hi Priya > > In the controller you have to specify at the top like "layout "mail"" > > Dear Abhi: > > Thanks for ur reply.. > I tried it .. bt didnt work.. I mean the mail was all the same.. > Also writing it on top of the controller will apply this to all the > actions. but i want it just for a specific action.. > > Regards, > Priya > -- > 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Bala kishore Pulicherla wrote:> if you want to apply a layout for a specific action you can do like this > in the controller say layout => ''main_layout'', :except => ''your_action'' > > in the action say > render :layout => ''mail_layout''Hi Bala: Writing layout => ''main_layout'', :except => ''your_action'' in controller returns syntax error.. plz send the corrected statement. Thanks Priya -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
What you need is this: http://cardboardrocket.com/pages/action_mailer_layouts hope it helps.. cheers.. On Oct 29, 8:15 pm, Priya Saini <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Bala kishore Pulicherla wrote: > > if you want to apply a layout for a specific action you can do like this > > in the controller say layout => ''main_layout'', :except => ''your_action'' > > > in the action say > > render :layout => ''mail_layout'' > > Hi Bala: > > Writing layout => ''main_layout'', :except => ''your_action'' in controller > returns syntax error.. plz send the corrected statement. > > Thanks > Priya > -- > Posted viahttp://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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
ooooops sorry layout ''main_layout'', :except => ''your_action'' but i think to get ur requirement u had to put some thing like @content_type = "text/html" in the mailer action On 10/29/07, Jet <abhijatmahajan-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > What you need is this: > > http://cardboardrocket.com/pages/action_mailer_layouts > > hope it helps.. > cheers.. > > On Oct 29, 8:15 pm, Priya Saini <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> > wrote: > > Bala kishore Pulicherla wrote: > > > if you want to apply a layout for a specific action you can do like > this > > > in the controller say layout => ''main_layout'', :except => > ''your_action'' > > > > > in the action say > > > render :layout => ''mail_layout'' > > > > Hi Bala: > > > > Writing layout => ''main_layout'', :except => ''your_action'' in controller > > returns syntax error.. plz send the corrected statement. > > > > Thanks > > Priya > > -- > > Posted viahttp://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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Jet wrote:> What you need is this: > > http://cardboardrocket.com/pages/action_mailer_layouts > > hope it helps.. > cheers.. > > On Oct 29, 8:15 pm, Priya Saini <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>Hey Jet: Thanks man.. this is what i was looking for.. Worked perfectly fine.. Best Regards, Priya Saini -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---