Rendering Partials from another Folder

64 views
Skip to first unread message

Giannakis P.

unread,
Jul 15, 2013, 5:04:49 PM7/15/13
to rubyonra...@googlegroups.com
Hello Guys :)
I'm fairly new to Rails and a problem keeps bugging me for days now.

I'mt Trying to render a Partial from my App/view/pins folder to my
app/view/layout folder (My menu).

Basically im trying to render my _form.html.erb to a Modal which is
triggered with a button on my Menu.

Im using Bootstrap.

Every time i give my modal the code:

<%= render 'pins/form' %>

i'm getting:
NoMethodError in Pins#index
undefined method `model_name' for NilClass:Class

I searched A LOT and EVERYWHERE but couldn't fix it..
Can anybody Help me?

(Git repo-> https://github.com/Theminijohn/Amphitryon)

--
Posted via http://www.ruby-forum.com/.

Dheeraj Kumar

unread,
Jul 15, 2013, 11:21:19 PM7/15/13
to rubyonra...@googlegroups.com
The object you're using to render the form is nil.

-- 
Dheeraj Kumar

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com.
To post to this group, send email to rubyonra...@googlegroups.com.

Reply all
Reply to author
Forward
0 new messages