vendredi 22 avril 2016

Random Generation of Items from Existing Model

I am fairly new to RoR and trying to get a basic app to work - I have a 'books' model and a 'genre' model. I wish to create a page that randomly generates books of different genre's for a user to select.

I have created a 'random_book' controller, but am unsure on how to proceed with the random selection and display.

Any help/pointers would be appreciated.

Thank you.

Aucun commentaire:

Enregistrer un commentaire