Having prob in partial render


#1

hi, i am actually new to ruby rails so i am trying to add
_sidebar.html.erb into my home.html.erb
by using the following code directly into the home.html.erb e.g

<% render :partial => "/shared/_side_bar" %>

but now it gives me an error
Missing template /shared/__side_bar.erb in view path E:/ruby/rubydev/
blog/app/views:

tree structure lok like this:

view/
shared/_sidebar.html.erb
layout/home.html.erb

can any one help out where i am wrong
thanks to all in advance :slight_smile:


#2

Take out the initial underscore from the render call. It assumes an
underscored filename

Blog: http://random8.zenunit.com/
Learn rails: http://sensei.zenunit.com/