On 2 April 2010 22:27, Marian Steinbach <[email protected]> wrote: > Hi! > > I think I'm trying to accomplish something very common, but I can't > find a way to do it. > > Creating a certain type of database record is a very frequent task in > my application (or at least it should be ;-)). So I want to be able to > place the form for creating that database record in practically any > view, not just the /mymodel/new view. > > I figured that this might be done using a partial, but since I'm > pretty new to rails, I don't get it one.
Assuming you know the basics of rendering a partial within a view (if not look at the guides at http://guides.rubyonrails.org/) then all you have to do is include a path in the render partial to tell it where it is. render :partial => "/somefolder/form" will look for views/somefolder/_form.html.erb Colin -- 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 [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

