I have a link that has a class: 'btn btn-info'
style on it. The problem is when I disable the link the bootstrap style doesn't appear I only get a plain text.
<%= link_to_if organisme.active?, 'Show', organismereferent_path(organisme), class: 'btn btn-info', :disabled => !organisme.active? %>
What I tried to do is change the link_to_if
for a button_to
<%= button_to 'Show', organismereferent_path(organisme), class: 'btn btn-info', :disabled => !organisme.active? %>
This works but now the button does not send the user to the right place it stays on the same page. What is the correct way of handling this situation?