lundi 2 juillet 2018

Rails Linking to an alternative view other than show

This is Rails 3.2

I have a list of visits and a button that I want to use to call a visit with an alternative view other than show . the button code in haml is:

  link_to 'Checkout', render('checkout'),  class: 'btn btn-mini btn-danger'

The button is in a visits view and the I have checkout.html.haml under visits/views

It seems like render should do it but it doesn't

How can I render a different view other than the default show

Aucun commentaire:

Enregistrer un commentaire