Hi,

Well in my attempt to write a simple CMS, I have been thrown into a wild goose chase! multiple times! Luckily, I found and caught the wild goose My experience deals with the methods (maybe there are more) of render_file and render_template.

First, I placed a render_file call into a helper like so:
Code:
render_file("#{RAILS_ROOT}/app/types/" + @item.content_type.to_s + '/' + name + '.rhtml')
      produces
      No rhtml, rxml, or delegate template found for ./script/../config/../app/types/basic/item.rhtml
As you can see, thats not right. (Yes it does exist, as you'll see in a second). So I went looking around for awhile and couldn't find a solution so I decided to use render_template which by looking at the source of render_file, I could see it called. So I did this:
Code:
render_template('rhtml', nil, "#{RAILS_ROOT}/app/types/" + @item.content_type.to_s + '/' + name + '.rhtml')
Which works. What? Yea. I just thought I was passing incorrect parameters and thought nothing of it. So I continued programming until I realized, itd be much easier to put the render calls into the controller since the controller must call it too and the helper can call the controller, but not vice versa. So I copied and pasted my method into my controller, which produced the infamous:
No rhtml, rxml, or delegate template found for ./script/../config/../app/types/basic/item.rhtml
What?!!! I copied the code exactly! So then I thought "what about giving render_file another go" so I put the exact code that didn't work before (see above) into the controller's method. Guess what?
It worked

Still, I didn't think much of it... just that it was strange. Then I stumbled upon a google cache of the APIs and saw that the parameters for render_template were different. Just to let you all know, my rails is updated to the lastest version, i promise. I just updated a few days ago. So my hypothesis is that somehow the old method is being used from the controller, and the new from the helper.

Is that possible? If so, why? If not, what else could be happening to explain these occurences?