fanz
2007-Jun-03 17:28 UTC
can I use template to assemble a html page in an controller and redirect to another controller?
Hi,all! I want to assemble a html page and put it into flash and redirect to another controller ,for example: flash[:aaa]="<html><body><div>hi</div></body></html>" but what I need is to assemble some more complicate html page,so I want to read the render result of a template before to send it to browser. Any thought? Thanks in advance :-) --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
liquidautumn
2007-Jun-03 18:21 UTC
Re: can I use template to assemble a html page in an controller and redirect to another controller?
chanses you going wrong directions. passing html through session seems unnatural what are you trying to accomplish? On Jun 3, 8:28 pm, fanz <winstar...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi,all! > I want to assemble a html page and put it into flash and redirect to > another controller ,for example: > > flash[:aaa]="<html><body><div>hi</div></body></html>" > > but what I need is to assemble some more complicate html page,so I > want to read the render result of a template before to send it to > browser. > Any thought? > Thanks in advance :-)--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
fanz
2007-Jun-03 23:55 UTC
Re: can I use template to assemble a html page in an controller and redirect to another controller?
On Jun 4, 2:21 am, liquidautumn <d...-PfseE6/LE5QxpvK4C0GaPQ@public.gmane.org> wrote:> chanses you going wrong directions. > passing html through session seems unnatural > what are you trying to accomplish?I''m trying to redirect a urlA to urlB but finally response with the urlA content,like this: request urlA: domain.com/controller/action/ redirect to urlB:domain.com/#controller/action/ so then I can change the urlB as I want by js without refresh the page,and urlA is just for search engine --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
fanz
2007-Jun-03 23:56 UTC
Re: can I use template to assemble a html page in an controller and redirect to another controller?
On Jun 4, 2:21 am, liquidautumn <d...-PfseE6/LE5QxpvK4C0GaPQ@public.gmane.org> wrote:> chanses you going wrong directions. > passing html through session seems unnatural > what are you trying to accomplish?I''m trying to redirect a urlA to urlB but finally response with the urlA content,like this: request urlA: domain.com/controller/action/ redirect to urlB:domain.com/#controller/action/ so then I can change the urlB as I want by js without refresh the page,and urlA is just for search engine --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
fanz
2007-Jun-04 00:18 UTC
Re: can I use template to assemble a html page in an controller and redirect to another controller?
On Jun 4, 2:21 am, liquidautumn <d...-PfseE6/LE5QxpvK4C0GaPQ@public.gmane.org> wrote:> chanses you going wrong directions. > passing html through session seems unnatural > what are you trying to accomplish?I''m trying to redirect a urlA to urlB but finally response with the urlA content,like this: request urlA: domain.com/controller/action/ redirect to urlB:domain.com/#controller/action/ so then I can change the urlB as I want by js without refresh the page,and urlA is just for search engine --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
fanz
2007-Jun-04 00:35 UTC
Re: can I use template to assemble a html page in an controller and redirect to another controller?
I found the right way now: I can use render in the urlB place to render the urlA template --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---