dimanche 9 avril 2017

Passing some relations of a table by variant ruby on rails

I'm not sure if it's possible to do this but I'm importing different CSVs into multiple mySQL tables so I use multiple functions to do this import. how can I change something like:

@page = @book.pages.first

to this:

relation = pages

@page = @book.relation.first

Aucun commentaire:

Enregistrer un commentaire