Je suis en dernière année d'informatique et pratique le ruby depuis quelque mois ( 2-3 ) ... Ma réponse n'est donc pas une vérité absolue surtout qu'elle est intuitive
mais comme ca je dirais qu'il suffit de placer tes variables dans un Array ; @MesExercices = Array.new @MesExercices.push(exo1) @MesExercices.push(exo2) @MesExercices.push(exo3) . . . puis dans la vue faire quelque chose comme cela <% for unExercice in @MesExercices %> # Do whatever you want to ‘unExercice ’ expl :<label> <% unExercice.titre %> </label> <% end %> voilà , c'est ma première réponse sur le forum donc n'en demande pas trop :p en espérant avoir aidé ... bye Tanguy. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscr...@googlegroups.com. To post to this group, send email to rubyonrails-talk@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/912032cbbf09317e9b78b296305f938d%40ruby-forum.com. For more options, visit https://groups.google.com/d/optout.