open modal with link_to

0

Well, I've never done it and I've searched a lot of sites and can not find anything that does what I need. I need to make a modal popup appear from a link_to, the person when clicking the link_to opens the modal, thanks.

    
asked by anonymous 27.04.2017 / 17:35

2 answers

1

I think the best option is to use the bootstrap, take a look at this article: link

    
28.04.2017 / 14:37
0

I found this solution today from my own need and it worked.

Boris Bresciani's answer.

<%= link_to 'Click Here', '#myModal', 'data-toggle' => 'modal' %> 
    
30.11.2017 / 15:37