Hey guys - just a quick question about partials. I''m trying to put together an administrative console for my site (which is working great, thanks to the excellent and consistent help I''ve received here). Since I''m still new at this, I figured the easiest way to get it up and running quickly would be to use the views that already exist in my numerous scaffolds. However, since each view and partial resides in a different directory than the console, I would need to call them in a different way than just render :partial => ''partialname''. I tried plugging in the :controller as an option, but no go. Is what I''m trying to do even possible? Or even better, is there a better way that I could be going about this? Thanks! -- 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 -~----------~----~----~----~------~----~------~--~---
Just include the directory name, so if you have app/views/foo/_foo.rhtml, then: render :partial=>''foo/foo'' Cheers! On 10/9/06, Sean Colquhoun <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > Hey guys - just a quick question about partials. I''m trying to put > together an administrative console for my site (which is working great, > thanks to the excellent and consistent help I''ve received here). Since > I''m still new at this, I figured the easiest way to get it up and > running quickly would be to use the views that already exist in my > numerous scaffolds. However, since each view and partial resides in a > different directory than the console, I would need to call them in a > different way than just render :partial => ''partialname''. I tried > plugging in the :controller as an option, but no go. Is what I''m trying > to do even possible? Or even better, is there a better way that I could > be going about this?--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Sweet! You rock. Thanks! -- 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 -~----------~----~----~----~------~----~------~--~---
yep, 1 thing I started doing about a month ago is putting all of my partials in the layouts directory. Then, they are all in one place and easy to find later. Maybe it would make sense to create a partials directory. The layouts directory is good though. Usually I only have about 3 or 4 or 5 layouts in there anyway. -Dan On 10/9/06, Sean Colquhoun <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > Sweet! You rock. Thanks! > > > -- > Posted via http://www.ruby-forum.com/. > > > >-- bikle-FMj8menRjGsAvxtiuMwx3w@public.gmane.org http://bikle.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 -~----------~----~----~----~------~----~------~--~---