dimanche 23 avril 2017

Rails : iterate preview and download links in rails

**Two text fields for download and preview links to iterate in buttons**

     <div class="field">
    <%= f.text_field :preview, class: "form-control", placeholder: "preview link" %>
  </div>
  <div class="field">
    <%= f.text_field :download, class: "form-control", placeholder: "download link" %>
  </div>

Buttons for download and preview links:

<button class="btn btn-default"><i class="fa fa-eye"></i><%= link_to "Preview", @preview %></button>
    <button class="btn btn-default"><i class="fa fa-download"></i><%= link_to "Download", @download %></button>

enter image description here

Buttons links are not working.

can please show me how to iterate links inside buttons.

Aucun commentaire:

Enregistrer un commentaire