Rails - Ability to Enable/Disable Links on a View?
- by AnApprentice
Hello, I have a UserMailer View that has several link_to's like so:
<%= link_to('XXXXXXXX Link Title', item_url(@item, :only_path => false), :style => 'color:#5196E3;text-decoration:underline;') %>
The page has several different links. I'd like to know if there is a way to globally set in the view to enable or disable the links.
If enabled, the above would run like normal, if not the block above would just show the text (XXXXXXXX Link Title) and not be linked?
Any ideas other than wrapping every link_to inside a IF statement?
Thanks