From: ritchie Date: 2005-04-12T05:34:39+09:00 Subject: Re: rails use case ok, so far so good. Thanks Tony. I have the following code class SwitcherController < ApplicationController def index @p = @params["path"] @acc = Account.find_all render_file("/experiments/rail_test/public/content/#{@p}/index.rhtml",false) end def pagecontroller @wow = "wow it worked" end end So it get's content from whatever the supplied path is to the controller. Works, however, I only have one controller, and each possible page could have it's own "controller", i.e. somewhere where I can set up new vars for the page itself. I don't think I can include model references in the view for example. So, is it possible for the page to call it's own controller, an inversion of the usual process, page gets called from "SwitcherController", then the page does <% pagecontroller %> so that after the call <%=@wow%> is defined?? Ok, that's all I want :) Thanks for any info. R