What I want to do is have 2 different controllers, client and test_client. The client controller is already built and I want to create a test_client controller that i can use to play around with the UI of the client and adjust it as needed. I am mainly trying to get around the validation i have built into the client and its dependence on an admin controller that loads the data.
so i want the test_client controller to load a sample data set and then render the client controller’s index view so i can adjust the clients UI. That is all.
I tried this in the test_clients index method:
class TestClient
def index
render :template => 'client/index'
end
end
but i get an error because it cannot find the client partials as it is looking in the current controllers view for them…
So I have looked into this already and most people say that you should never make such a call but i think that this case is a reasonable usage…I just need to figure out how to get it to work.
You will need to adjust your view so that the path to the partial you need is in the form
'controller/partial'. In this case probably'client/partial'. Then you can simply userender 'client/index'as before.So say somewhere in your view you have this:
You will want to change it to this: