over the last several weeks i''ve really started trying to put partials to work to keep my views dry. it''s great but now i''m needing partials that span across different controllers, because i''m having duplicate files in my views. i don''t know if this would actually work, but i was thinking of having a Common controller for my partials and just rendering from there, but i just thought i would post up and see what other developers are doing or what the recommended way is. any help would be great thanks --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Josh wrote:> over the last several weeks i''ve really started trying to put partials > to work to keep my views dry. > > it''s great but now i''m needing partials that span across different > controllers, because i''m having duplicate files in my views. > > i don''t know if this would actually work, but i was thinking of having > a Common controller for my partials and just rendering from there, but > i just thought i would post up and see what other developers are doing > or what the recommended way is. > > any help would be great > > thanksyou can create a ''shared'' view directory. Then just reference them as render :partial => ''shared/view_name'' _Kevin --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
that was easy enough. thanks! --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---