Hey All I have a situation where I would like to try and build in a Fowler style "Two Step View" as the domain logic is always the same but the front end needs to be tottaly a difffert look and feel. In fowlers terms, i know rails uses a template view out of the box, however is there some way I could put somthing in before it got to the templating so that it enabled me to use a two step pattern? Thanks Tim -- 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 -~----------~----~----~----~------~----~------~--~---
Hello, On 3 Apr 2007, at 12:30, Tim Perrett wrote:> I have a situation where I would like to try and build in a Fowler > style > "Two Step View" as the domain logic is always the same but the > front end > needs to be tottaly a difffert look and feel. > > In fowlers terms, i know rails uses a template view out of the box, > however is there some way I could put somthing in before it got to the > templating so that it enabled me to use a two step pattern?This might be what you''re after: http://blog.jayfields.com/2007/03/rails-presenter-pattern.html Regards, Andy Stewart --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
> > http://blog.jayfields.com/2007/03/rails-presenter-pattern.html > > Regards, > Andy Stewarthmmm, that quite possibly might work. However from what i can tell it does indeed abstact page logic (part one of two step) but then how could I select a template... I would have to think of some convention to do this. Perhaps some subfolder derivitive of views named per presenter class or somthing? What do you think? Tim -- 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 -~----------~----~----~----~------~----~------~--~---
You can always render a partial who''s name is defined by a param in the URL or computed by the controller. Michael On Apr 3, 5:28 am, Tim Perrett <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> >http://blog.jayfields.com/2007/03/rails-presenter-pattern.html > > > Regards, > > Andy Stewart > > hmmm, that quite possibly might work. However from what i can tell it > does indeed abstact page logic (part one of two step) but then how could > I select a template... I would have to think of some convention to do > this. Perhaps some subfolder derivitive of views named per presenter > class or somthing? > > What do you think? > > Tim > > -- > 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 -~----------~----~----~----~------~----~------~--~---
MichaelLatta wrote:> You can always render a partial who''s name is defined by a param in > the URL or computed by the controller.I coudl indeed do this however I was looking for somthing a little cleaner to be honest - somthing programatic that can be called properly without having to worry about locals etc etc How does the rendering work with the rails templating? maybe its somthing i can adapt? Cheers Tim -- 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 -~----------~----~----~----~------~----~------~--~---