vendredi 30 septembre 2016

How to add multiple classes and attributes to rails button_to?

I'm quite new to rails and I was trying somehow add all the attributes and classes I have into the button_to within the button_to because at the moment it's adding a silver button box on top of my actual button, so I don't know how to actually combine the multiple classes above within it.

   <button class="class1" data-method="download" data-option="download" type="button" title="Download">
        <span class="class2" data-toggle="tooltip" data-placement="bottom" title="Download">
                <span class="icon">
                    <%= button_to proof_path(@param) %>
                </span>
        </span>
    </button>

link_to won't work because I want the actual button to be clickable and not text.

Any suggestions?

Aucun commentaire:

Enregistrer un commentaire