Seems like in the positive condition, link_to_if and link_to_unless are inconsistent. When I send a block to link_to (or for that matter anything else that calls content_tag) the block is used to determine the content in the case that “name” is not provided. It gets around this by shifting the args, effectively, as in (html_options, options, name = options, name, block if block_given?).
However, with link_to_if/link_to_unless, when the condition is met it always uses the main content. As in:
link_to_if(true, root_path) do
My Link <%= some_helper %>
looks like “/” in the UI and the block is ignored. I’d love to fix this, but want to make sure there isn’t some good reason first.