vendredi 2 septembre 2016

Setting default page for Controller in Rails

In rails how to set the default page for controller. In my application I have a controller named "greet" which have two actions "welcome" and "wishes". So while calling the welcome page like "localhost:3000/greet/welcome" is properly worked.

But My requirement is if I didn't give the action name for that controller like "localhost:3000/greet", then it takes the default page associated for that controller only. How to do this in rails 4.2. I tried to make an index action within greet controller. But it didn't work. Can anyone help me to solve this problem ?

Aucun commentaire:

Enregistrer un commentaire