Hi, I have a layout xyz.rhtml. And a footer.rhtml. Both these files reside in app/views/layouts/. In that layout, I am making a call like this: <%= render :file => "footer", :use_full_path => true%> I have also tried: <%= render :file => "footer"%> footer.rhtml is in the same directory as in xyz.rhtml. I get this exception: Showing /app/views/layouts/xyz.rhtml/ where line *#20* raised: |No rhtml, rxml, or delegate template found for footer| Extracted source (around line *#20*): |17: </div> 18: </div> 19: <div> 20: <%= render :file => "footer", :use_full_path => true%> 21: </div> 22: 23: | Que 1: Why is it not finding footer.rhtml? Que 2: footer.rhtml is like a view component, is this the best way to do this and place to put this file? (Note: I know about render :partial, question 2 is more of a design / code arrangement question) Thanks,
Does anyone know what I might be doing wrong ? I can provide additional information to solve this issue. Thanks, Mufaddal Khumri wrote:> Hi, > > I have a layout xyz.rhtml. And a footer.rhtml. Both these files reside > in app/views/layouts/. > > In that layout, I am making a call like this: > > <%= render :file => "footer", :use_full_path => true%> > > I have also tried: > > <%= render :file => "footer"%> > > footer.rhtml is in the same directory as in xyz.rhtml. > > I get this exception: > > Showing /app/views/layouts/xyz.rhtml/ where line *#20* raised: > > |No rhtml, rxml, or delegate template found for footer| > > Extracted source (around line *#20*): > > |17: </div> > 18: </div> > 19: <div> > 20: <%= render :file => "footer", :use_full_path => true%> > 21: </div> > 22: 23: | > > > Que 1: Why is it not finding footer.rhtml? > > Que 2: footer.rhtml is like a view component, is this the best way to > do this and place to put this file? > (Note: I know about render :partial, question 2 is more of a design / > code arrangement question) > > Thanks, > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails
Hi, I am a bit perplexed and would really like someone to shed some light on this issue. I have a layout xyz.rhtml. And a footer.rhtml. Both these files reside in app/views/layouts/. In that layout, I am making a call like this: <%= render :file => "footer", :use_full_path => true%> I have also tried: <%= render :file => "footer"%> footer.rhtml is in the same directory as in xyz.rhtml. I get this exception: Showing /app/views/layouts/xyz.rhtml/ where line *#20* raised: |No rhtml, rxml, or delegate template found for footer| Extracted source (around line *#20*): |17: </div> 18: </div> 19: <div> 20: <%= render :file => "footer", :use_full_path => true%> 21: </div> 22: 23: | Que 1: Why is it not finding footer.rhtml? Que 2: footer.rhtml is like a view component, is this the best way to do this and place to put this file? (Note: I know about render :partial, question 2 is more of a design / code arrangement question) Thanks,