Rendering Partial from another Folder

Hey Guys i’m New to Rails (3 weeks now) and i’m Trying to render a
Partial
from my *app/views/pins *to my *layouts/_header *(My Menu) in a Modal.
Im
Using Bootstrap.
So i render it with <%= render “pins/form” %> but i get an undefined
method `model_name’ for NilClass:Class.]
My Modal Looks Like This :

Modal header
<%= render 'pins/form' %>
Close Save changes

I searched 2 days now for a possible solution but found nothing :frowning:
Can anybody help me ?

Thanks,
Johnny

On Mon, Jul 15, 2013 at 1:47 PM, Giannakis P.
[email protected] wrote:

So i render it with <%= render “pins/form” %> but i get an undefined method
`model_name’ for NilClass:Class.]

So find the object that ‘model_name’ is being called on and figure
out why it’s nil.


Hassan S. ------------------------ [email protected]

twitter: @hassan

On 15 July 2013 21:47, Giannakis P. [email protected] wrote:

Hey Guys i’m New to Rails (3 weeks now) and i’m Trying to render a Partial
from my app/views/pins to my layouts/_header (My Menu) in a Modal. Im Using
Bootstrap.
So i render it with <%= render “pins/form” %> but i get an undefined method
`model_name’ for NilClass:Class.]

If you look through the call stack that should have been displayed in
the server window then you should find it referencing one of your
lines of code. There you will find which object is nil.

Colin