lib/hanami/helpers/link_to_helper.rb in hanami-helpers-0.3.0 vs lib/hanami/helpers/link_to_helper.rb in hanami-helpers-0.4.0
- old
+ new
@@ -113,11 +113,11 @@
# # => ArgumentError
#
# @example With only content
# <%= link_to 'Home' %>
# # => ArgumentError
- def link_to(content, url = nil, options = {}, &blk)
+ def link_to(content, url = nil, options = {}, &blk) # rubocop:disable Metrics/MethodLength
if block_given?
options = url || {}
url = content
content = nil
end
@@ -126,10 +126,10 @@
options[:href] = url or raise ArgumentError
rescue TypeError
raise ArgumentError
end
- html.a(blk || content, options).to_s
+ html.a(blk || content, options)
end
end
end
end