Mats Persson
2005-Oct-10 19:33 UTC
[BUG ??] ''uses_component_template_root'' problems with implementation in component
Hi all, I hope this will reach those that can help or change things, IF it is a bug/''feature'' issue. At least it seems like it to a newbie like me. BACKGROUND:: I have a basic html file in [ /app/views/layouts/application.rhtml ] that contains this <html> <%= render ''shared/header'' %> </html I then have a component [ /app/components/admin/ ] that has a controller called login_controller.rb and contains this: # This controller provides actions to log a user in and out. class Admin::LoginController < ApplicationController uses_component_template_root layout ''../app/views/layouts/application'' # will show the login box html def index end end PROBLEM:: When I visit [ http://localhost:3000/ ] the shared header view shows up fine, but when I then try to visit the [ http://localhost:3000/ admin/login ] URL I get this Error: ActionView::ActionViewError in Admin/login#index Showing /../app/views/layouts/application.rhtml where line #2 raised: No rhtml, rxml, or delegate template found for shared/header Why is that ? and I have tried every other possibility that I can think of, such as [ render :file, :partial, etc ] but it doesn''t work in both areas. It only works in one area. I hope I''m not trying to achieve something impossible here. Very grateful for any help and assistance on this point. PS got the idea for this component from the activeRBAC stuff. Kind regards, Mats ---- "TextMate, coding with an incredible sense of joy and ease" - www.macromates.com -