module ActionView::Helpers::UrlHelper

def link_to_unless(condition, name, options = {}, html_options = {}, &block)

# => Reply
# If not...
# => Reply
# If the user is logged in...
%>
end
link_to(name, { controller: "accounts", action: "signup" })
link_to_unless(@current_user.nil?, "Reply", { action: "reply" }) do |name|
<%=

# => Reply
# If the user is logged in...
<%= link_to_unless(@current_user.nil?, "Reply", { action: "reply" }) %>
==== Examples

accepts the name or the full argument list for +link_to_unless+.
than just the plaintext link text), you can pass a block that
returned. To specialize the default behavior (i.e., show a login link rather
+options+ unless +condition+ is true, in which case only the name is
Creates a link tag of the given +name+ using a URL created by the set of
def link_to_unless(condition, name, options = {}, html_options = {}, &block)
  link_to_if !condition, name, options, html_options, &block
end