All (and kevin),
After flying high for a while on Rails things, I’m down to the nitty
gritty of
Ruby stuff. Messing with vars and printing them out on a web page.
I found the controller_path in the API docs;
However when putting this in a controller:
@test1 = controller_class_name
@test2 = controller_name
@test3 = controller_path
And this in a partial:
Test1 <%= @test1 %>
Test2 <%= @test2 %>
Test3 <%= @test3 %>
I get this in my browser:
Test1 MainController
Test2 main
On the third one I get a: undefined local variable or method
`controller_path’
Is there a difference with the 1st and 2nd? Is this a faulty application
to do
so?
Thanx!
Gerard.
On Wednesday 04 January 2006 18:58, Kevin O. tried to type
something
like:
Gerard wrote:
Is there a way to point out the module (or controller group if you will)
I’m
in?Thanx!
I think controller.controller_path might give you ‘module/controller’
–
“Who cares if it doesn’t do anything? It was made with our new
Triple-Iso-Bifurcated-Krypton-Gate-MOS process …”
My $Grtz =~ Gerard;
~
:wq!