Each case you will have one approach that better resolve your needs. Firstly, you should avoid this kind of situation, off course this is not possible always but if you do RESTFul apps this kind of situation is not so usual.
Well, going direct to your problem, you should load all dependencies on second controller, and yes, this lead you to an not DRY environment. First, you should not have many variables being assigned per action, this is a bad practice, anyway, you can have a module to encapsulate filters included in both controllers... this can sound not practical, but in truth this avoid you to forget to alter the behavior in one side without affect the other... I want that this tip was helpful ;) On Thu, Jul 2, 2009 at 1:26 AM, James Englert <englert.ja...@gmail.com>wrote: > Say controller x, action a has a form on it that submits to controller y, > action b, and validation fails during the submit. I want to display the > result of controller x, action a with the validation messages. > > In psuedocode, I am here: > > ' > controller y > > action b > if !item.save > # Do something here > end > end > > I'm having trouble with the do somethign here section. I tried "render > :template 'x/A'" but that didn't load all the required information. What is > the best practice for cross controller validation failures? > > Thanks > Jim Englert. > > > > -- Everton J. Carpes Mobile: +55 53 9129.4593 MSN: mask...@gmail.com UIN: 343716195 Jabber: everton.car...@jabber.org Twitter: http://twitter.com/everton_carpes Blog: http://www.geek.com.br/blogs/832697633-My-Way Feeds: https://www.google.com/reader/shared/05200358440305782625 "If art interprets our dreams, the computer executes them in the guise of programs!" - Alan J. Perlis --~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---