I have two models generated with generate scaffolding, one is a LogBook the other is LogEntry. I want to render the form partial for LogEntry on the LogBook show page. Whe
Try switching the render method as follows:
<%= render :partial => 'log_entries/form', :log_entry => @log_book.LogEntries.new %>
Using just render works when passing an instance variable of the object. However, since you're specifying a file, it's best to use the option.
You can render whatever partial you want as long as you give it's path from the view folder:
<%= render :partial => '/log_entries/form', :log_entry => @log_book.log_entries.build %>
Your path must begin with a / to let Rails know you're relative to the view folder.
Otherwise it's assumed to be relative to your current folder.
As a sidenote, it's good practive to avoid using instance variables in partial, you did it right then.
Just seen you have an error in your partial's form:
:Text
Should not be a valid column name of your model. Try :text