I'm trying to make it so if a user has accepted an invite, they have the option of clicking the not_attending div to cancel the invite.
However, I'd like the not_attending div to remain present even if a user hasn't accepted an invite, just without a link.
Someone in another thread kindly pointed me toward the link_to_if method, which takes arguments in the form:
link_to_if(condition, name, options = {}, html_options = {}, &block)
Here is the code I'm working with:
<%= link_to_if(invite.accepted, "Name I Don't Want", not_attending_path) %>
<div class="not_attending_div">
not attending
</div>
So, is there a way to use the not_attending div as the name parameter, similiar to how you can augment link_to in the following fashion:
<%= link_to(users_path) do %>
<div id="fancydiv">This div is more than just text</div>
<% end %>