Rather new to RoR, so I’m not sure about the terminology and such :-/ .
My question is: how could I know the model which is associated to a
- controller class is TestController, which is a subclass of
- associated model class is Test
How could I write some code in a method of ApplicationController to
dermine the current associated model?
So, if I have a “foo” method in ApplicationController (and no such
method in TestController), when I try to go to /test/foo,
ApplicationController::foo is executed. In this method, I would like to,
say, list all Test objects (but it could be another model if called from
another subclass). How could I know that the current model is Test?
Yannick M. http://www.inma.ucl.ac.be/~majoros
4, avenue G. LemaÃ®tre
Si vous avez des problÃ¨mes pour afficher ce message (accents qui ne
passent pas, signature Ã©lectronique, …) votre systÃ¨me de mail n’est
pas conforme aux standards modernes, voir
#JAPH : http://www.inma.ucl.ac.be/~majoros/japh.txt