"./blah/blah" vs. "/blah/blah"


#1

Hello,
Earlier in my rails application, I was using the convention of writing
the
following to refer to templates and/or views in the view folder.
“./blah/blah”

But in the Edge rail, it doesn’t work and the page doesn’t shows any
output
there is no error in the development log as well. But changing the above
to
“/blah/blah” seems to fix things.

Was I wrong in using the earlier convention or is something else amiss?

Thanks.

Surendra S.
http://ssinghi.kreeti.com, http://www.kreeti.com
Read my blog at: http://cuttingtheredtape.blogspot.com/
,----
| “All animals are equal, but some animals are more equal than others.”
| – Orwell, Animal Farm, 1945
`----


#2

Surendra S. wrote:

Hello,
Earlier in my rails application, I was using the convention of writing
the
following to refer to templates and/or views in the view folder.
“./blah/blah”

But in the Edge rail, it doesn’t work and the page doesn’t shows any
output
there is no error in the development log as well. But changing the above
to
“/blah/blah” seems to fix things.

Was I wrong in using the earlier convention or is something else amiss?

I thought the convention was to leave out the beginning slash and just
write ‘blah/blah’.

-matthew


#3

Matthew I. removed_email_address@domain.invalid writes:

to
“/blah/blah” seems to fix things.

Was I wrong in using the earlier convention or is something else amiss?

I thought the convention was to leave out the beginning slash and just
write ‘blah/blah’.

Nope, not when one is giving an absolute path, starting from the views
folder.

So, if your view is in a folder ‘home’ then Rails, will assume that
‘blah/blah’ points to home/blah/blah


Surendra S.
http://ssinghi.kreeti.com, http://www.kreeti.com

,----
| “All animals are equal, but some animals are more equal than others.”
| – Orwell, Animal Farm, 1945
`----


#4

Matthew I. removed_email_address@domain.invalid writes:

to
“/blah/blah” seems to fix things.

Was I wrong in using the earlier convention or is something else amiss?

I thought the convention was to leave out the beginning slash and just
write ‘blah/blah’.

My bad, thanks for pointing this out.

Surendra S.
http://ssinghi.kreeti.com, http://www.kreeti.com
Read the latest news at: http://news.kreeti.com
,----
| “War is Peace! Freedom is Slavery! Ignorance is Strength!”
| – Orwell, 1984, 1948
`----